From 22160bb79196b99ad05ea0117dc4323415f8ef4e Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 15 Aug 2024 11:42:19 -0700 Subject: [PATCH] Changes in generated code (#98) * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code --- README.md | 14 +- .../item_copilot_usage_request_builder.go | 6 +- .../item_team_item_copilot_request_builder.go | 28 + ...team_item_copilot_usage_request_builder.go | 81 ++ .../enterprises/item_team_request_builder.go | 35 + ...eam_with_team_slug_item_request_builder.go | 28 + .../with_enterprise_item_request_builder.go | 5 + pkg/github/kiota-lock.json | 2 +- pkg/github/models/api_overview.go | 35 + .../models/code_security_configuration.go | 59 ++ ...tion_dependency_graph_autosubmit_action.go | 40 + ...endency_graph_autosubmit_action_options.go | 81 ++ pkg/github/models/copilot_seat_details.go | 117 +-- .../models/copilot_seat_details_assignee.go | 52 + ..._custom_property.go => custom_property.go} | 147 +-- .../models/custom_property_value_type.go | 43 + .../custom_property_values_editable_by.go | 37 + .../models/org_custom_property_value_type.go | 43 - .../org_custom_property_values_editable_by.go | 37 - pkg/github/models/organization.go | 894 ------------------ pkg/github/models/organization_plan.go | 196 ---- ...ository_ruleset_bypass_actor_actor_type.go | 5 +- .../secret_scanning_push_protection_bypass.go | 140 +++ ...canning_push_protection_bypass503_error.go | 146 +++ ..._scanning_push_protection_bypass_reason.go | 40 + ...body_dependency_graph_autosubmit_action.go | 40 + ...body_dependency_graph_autosubmit_action.go | 40 + ...os_post_request_body_merge_commit_title.go | 2 +- ..._request_body_squash_merge_commit_title.go | 2 +- ...m_with_configuration_patch_request_body.go | 29 + ...endency_graph_autosubmit_action_options.go | 81 ++ ...curity_configurations_post_request_body.go | 29 + ...endency_graph_autosubmit_action_options.go | 81 ++ .../item_copilot_usage_request_builder.go | 6 +- ...em_properties_schema_patch_request_body.go | 18 +- .../item_properties_schema_request_builder.go | 20 +- ...stom_property_name_item_request_builder.go | 16 +- ...esets_with_ruleset_item_request_builder.go | 4 +- .../item_team_item_copilot_request_builder.go | 28 + ...team_item_copilot_usage_request_builder.go | 81 ++ pkg/github/orgs/item_team_request_builder.go | 35 + ...eam_with_team_slug_item_request_builder.go | 28 + .../orgs/with_org_item_request_builder.go | 5 + ...o_patch_request_body_merge_commit_title.go | 2 +- ..._request_body_squash_merge_commit_title.go | 2 +- ...esets_with_ruleset_item_request_builder.go | 6 +- ...h_protection_bypasses_post_request_body.go | 111 +++ ...ush_protection_bypasses_request_builder.go | 65 ++ ...em_item_secret_scanning_request_builder.go | 5 + ...os_post_request_body_merge_commit_title.go | 2 +- ..._request_body_squash_merge_commit_title.go | 2 +- 51 files changed, 1661 insertions(+), 1390 deletions(-) create mode 100644 pkg/github/enterprises/item_team_item_copilot_request_builder.go create mode 100644 pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go create mode 100644 pkg/github/enterprises/item_team_request_builder.go create mode 100644 pkg/github/enterprises/item_team_with_team_slug_item_request_builder.go create mode 100644 pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action.go create mode 100644 pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action_options.go create mode 100644 pkg/github/models/copilot_seat_details_assignee.go rename pkg/github/models/{org_custom_property.go => custom_property.go} (61%) create mode 100644 pkg/github/models/custom_property_value_type.go create mode 100644 pkg/github/models/custom_property_values_editable_by.go delete mode 100644 pkg/github/models/org_custom_property_value_type.go delete mode 100644 pkg/github/models/org_custom_property_values_editable_by.go delete mode 100644 pkg/github/models/organization.go delete mode 100644 pkg/github/models/organization_plan.go create mode 100644 pkg/github/models/secret_scanning_push_protection_bypass.go create mode 100644 pkg/github/models/secret_scanning_push_protection_bypass503_error.go create mode 100644 pkg/github/models/secret_scanning_push_protection_bypass_reason.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph_autosubmit_action.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph_autosubmit_action.go create mode 100644 pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body_dependency_graph_autosubmit_action_options.go create mode 100644 pkg/github/orgs/item_code_security_configurations_post_request_body_dependency_graph_autosubmit_action_options.go create mode 100644 pkg/github/orgs/item_team_item_copilot_request_builder.go create mode 100644 pkg/github/orgs/item_team_item_copilot_usage_request_builder.go create mode 100644 pkg/github/orgs/item_team_request_builder.go create mode 100644 pkg/github/orgs/item_team_with_team_slug_item_request_builder.go create mode 100644 pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_post_request_body.go create mode 100644 pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_request_builder.go diff --git a/README.md b/README.md index ecacc5f0..26af6d14 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +> [!IMPORTANT] +> This SDK is not yet stable. Breaking changes may occur at any time. + # github.com/octokit/go-sdk An "alpha" version of a generated Go SDK for the standard GitHub.com product, generated from [GitHub's OpenAPI spec](https://github.com/github/rest-api-description), built on [Kiota](https://github.com/microsoft/kiota). @@ -20,20 +23,21 @@ You may also want: - [NuGet link](https://www.nuget.org/packages/GitHub.Octokit.SDK) - For GitHub Enterprise Cloud - [dotnet-sdk-enterprise-cloud repository](https://github.com/octokit/dotnet-sdk-enterprise-cloud) + - [NuGet link](https://www.nuget.org/packages/GitHub.Octokit.GHEC.SDK/) - For GitHub Enterprise Server - [dotnet-sdk-enterprise-server repository](https://github.com/octokit/dotnet-sdk-enterprise-server) + - [NuGet link](https://www.nuget.org/packages?q=GitHub.Octokit.GHES.SDK) - For our classic non-generated, hand-maintained Octokit.net project - [Octokit.net repository](https://github.com/octokit/octokit.net) - - For why we're building generative SDKs, see [Why a generated SDK?](#why-a-generated-sdk) below + - [NuGet link](https://www.nuget.org/packages/Octokit/) - [source-generator](https://github.com/octokit/source-generator) (the repository that creates these generated SDKs) - Contributions to this repository should take place in source-generator instead, as they'll be distributed here through mechanisms there. +- For why we're building generative SDKs, see [Why a generated SDK?](#why-a-generated-sdk) below ## How do I use it? See example client instantiations and requests in [example_test.go](pkg/example_test.go) or in the [cmd/ directory](cmd/). -⚠️ **Note**: This SDK is not yet stable. Breaking changes may occur at any time. - ### Building and testing - Build the SDK: `go build ./...` @@ -83,9 +87,7 @@ Authenticating as an App installation can be done using the `WithGitHubAppAuthen ## Why a generated SDK? -We want to... -1. provide 100% coverage of the API in our SDK -2. use this as a building block for future SDK tooling. +Please take a moment and head over to the GitHub blog to read more about the [why's and how's behind our move to Generative SDKs](https://github.blog/news-insights/product-news/our-move-to-generated-sdks/). ## Why Go? diff --git a/pkg/github/enterprises/item_copilot_usage_request_builder.go b/pkg/github/enterprises/item_copilot_usage_request_builder.go index 467efd0e..fd20eb7b 100644 --- a/pkg/github/enterprises/item_copilot_usage_request_builder.go +++ b/pkg/github/enterprises/item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. type ItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/enterprises/item_team_item_copilot_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_request_builder.go new file mode 100644 index 00000000..e1f3b524 --- /dev/null +++ b/pkg/github/enterprises/item_team_item_copilot_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamItemCopilotRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\team\{team_slug}\copilot +type ItemTeamItemCopilotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamItemCopilotRequestBuilderInternal instantiates a new ItemTeamItemCopilotRequestBuilder and sets the default values. +func NewItemTeamItemCopilotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotRequestBuilder) { + m := &ItemTeamItemCopilotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/team/{team_slug}/copilot", pathParameters), + } + return m +} +// NewItemTeamItemCopilotRequestBuilder instantiates a new ItemTeamItemCopilotRequestBuilder and sets the default values. +func NewItemTeamItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemTeamItemCopilotUsageRequestBuilder when successful +func (m *ItemTeamItemCopilotRequestBuilder) Usage()(*ItemTeamItemCopilotUsageRequestBuilder) { + return NewItemTeamItemCopilotUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go new file mode 100644 index 00000000..485b7326 --- /dev/null +++ b/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go @@ -0,0 +1,81 @@ +package enterprises + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemTeamItemCopilotUsageRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\team\{team_slug}\copilot\usage +type ItemTeamItemCopilotUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +type ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + Since *string `uriparametername:"since"` + // Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + Until *string `uriparametername:"until"` +} +// NewItemTeamItemCopilotUsageRequestBuilderInternal instantiates a new ItemTeamItemCopilotUsageRequestBuilder and sets the default values. +func NewItemTeamItemCopilotUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotUsageRequestBuilder) { + m := &ItemTeamItemCopilotUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/team/{team_slug}/copilot/usage{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemTeamItemCopilotUsageRequestBuilder instantiates a new ItemTeamItemCopilotUsageRequestBuilder and sets the default values. +func NewItemTeamItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a []CopilotUsageMetricsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-an-enterprise-team +func (m *ItemTeamItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable) + } + } + return val, nil +} +// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + 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 *ItemTeamItemCopilotUsageRequestBuilder when successful +func (m *ItemTeamItemCopilotUsageRequestBuilder) WithUrl(rawUrl string)(*ItemTeamItemCopilotUsageRequestBuilder) { + return NewItemTeamItemCopilotUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_team_request_builder.go b/pkg/github/enterprises/item_team_request_builder.go new file mode 100644 index 00000000..8a781d72 --- /dev/null +++ b/pkg/github/enterprises/item_team_request_builder.go @@ -0,0 +1,35 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\team +type ItemTeamRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTeam_slug gets an item from the github.com/octokit/go-sdk/pkg/github.enterprises.item.team.item collection +// returns a *ItemTeamWithTeam_slugItemRequestBuilder when successful +func (m *ItemTeamRequestBuilder) ByTeam_slug(team_slug string)(*ItemTeamWithTeam_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if team_slug != "" { + urlTplParams["team_slug"] = team_slug + } + return NewItemTeamWithTeam_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamRequestBuilderInternal instantiates a new ItemTeamRequestBuilder and sets the default values. +func NewItemTeamRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamRequestBuilder) { + m := &ItemTeamRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/team", pathParameters), + } + return m +} +// NewItemTeamRequestBuilder instantiates a new ItemTeamRequestBuilder and sets the default values. +func NewItemTeamRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/enterprises/item_team_with_team_slug_item_request_builder.go b/pkg/github/enterprises/item_team_with_team_slug_item_request_builder.go new file mode 100644 index 00000000..6bec05ea --- /dev/null +++ b/pkg/github/enterprises/item_team_with_team_slug_item_request_builder.go @@ -0,0 +1,28 @@ +package enterprises + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamWithTeam_slugItemRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\team\{team_slug} +type ItemTeamWithTeam_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamWithTeam_slugItemRequestBuilderInternal instantiates a new ItemTeamWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamWithTeam_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamWithTeam_slugItemRequestBuilder) { + m := &ItemTeamWithTeam_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/team/{team_slug}", pathParameters), + } + return m +} +// NewItemTeamWithTeam_slugItemRequestBuilder instantiates a new ItemTeamWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamWithTeam_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamWithTeam_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamWithTeam_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Copilot the copilot property +// returns a *ItemTeamItemCopilotRequestBuilder when successful +func (m *ItemTeamWithTeam_slugItemRequestBuilder) Copilot()(*ItemTeamItemCopilotRequestBuilder) { + return NewItemTeamItemCopilotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/enterprises/with_enterprise_item_request_builder.go b/pkg/github/enterprises/with_enterprise_item_request_builder.go index 72c0de51..f07e04af 100644 --- a/pkg/github/enterprises/with_enterprise_item_request_builder.go +++ b/pkg/github/enterprises/with_enterprise_item_request_builder.go @@ -36,3 +36,8 @@ func (m *WithEnterpriseItemRequestBuilder) Dependabot()(*ItemDependabotRequestBu func (m *WithEnterpriseItemRequestBuilder) SecretScanning()(*ItemSecretScanningRequestBuilder) { return NewItemSecretScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Team the team property +// returns a *ItemTeamRequestBuilder when successful +func (m *WithEnterpriseItemRequestBuilder) Team()(*ItemTeamRequestBuilder) { + return NewItemTeamRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ab55d839..ad7dc347 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "69B161AEBDE87E127DB15C26F687951F2C4EC154754CC81FAEE2C1258265EA737FE15B6459B3F721B15D2F078A075486011134B82AE8CDB0828C485EE1CE03E8", + "descriptionHash": "694359525568DD1AA45AFD91B5B9D5AD295A934D8D3DDFF2239A7D9E045B1D4FB9160ADA93E86FEAA6B699200247F0089475A684F1EF62141A39A9B717822BD6", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/pkg/github/models/api_overview.go b/pkg/github/models/api_overview.go index bc68b0f6..6c0672eb 100644 --- a/pkg/github/models/api_overview.go +++ b/pkg/github/models/api_overview.go @@ -14,6 +14,8 @@ type ApiOverview struct { additionalData map[string]any // The api property api []string + // The copilot property + copilot []string // The dependabot property dependabot []string // The domains property @@ -71,6 +73,11 @@ func (m *ApiOverview) GetAdditionalData()(map[string]any) { func (m *ApiOverview) GetApi()([]string) { return m.api } +// GetCopilot gets the copilot property value. The copilot property +// returns a []string when successful +func (m *ApiOverview) GetCopilot()([]string) { + return m.copilot +} // GetDependabot gets the dependabot property value. The dependabot property // returns a []string when successful func (m *ApiOverview) GetDependabot()([]string) { @@ -133,6 +140,22 @@ func (m *ApiOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["copilot"] = 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.SetCopilot(res) + } + return nil + } res["dependabot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") if err != nil { @@ -379,6 +402,12 @@ func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + if m.GetCopilot() != nil { + err := writer.WriteCollectionOfStringValues("copilot", m.GetCopilot()) + if err != nil { + return err + } + } if m.GetDependabot() != nil { err := writer.WriteCollectionOfStringValues("dependabot", m.GetDependabot()) if err != nil { @@ -475,6 +504,10 @@ func (m *ApiOverview) SetAdditionalData(value map[string]any)() { func (m *ApiOverview) SetApi(value []string)() { m.api = value } +// SetCopilot sets the copilot property value. The copilot property +func (m *ApiOverview) SetCopilot(value []string)() { + m.copilot = value +} // SetDependabot sets the dependabot property value. The dependabot property func (m *ApiOverview) SetDependabot(value []string)() { m.dependabot = value @@ -529,6 +562,7 @@ type ApiOverviewable interface { GetActions()([]string) GetActionsMacos()([]string) GetApi()([]string) + GetCopilot()([]string) GetDependabot()([]string) GetDomains()(ApiOverview_domainsable) GetGit()([]string) @@ -544,6 +578,7 @@ type ApiOverviewable interface { SetActions(value []string)() SetActionsMacos(value []string)() SetApi(value []string)() + SetCopilot(value []string)() SetDependabot(value []string)() SetDomains(value ApiOverview_domainsable)() SetGit(value []string)() diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go index 9392aee8..8eb5f8d9 100644 --- a/pkg/github/models/code_security_configuration.go +++ b/pkg/github/models/code_security_configuration.go @@ -21,6 +21,10 @@ type CodeSecurityConfiguration struct { dependabot_security_updates *CodeSecurityConfiguration_dependabot_security_updates // The enablement status of Dependency Graph dependency_graph *CodeSecurityConfiguration_dependency_graph + // The enablement status of Automatic dependency submission + dependency_graph_autosubmit_action *CodeSecurityConfiguration_dependency_graph_autosubmit_action + // Feature options for Automatic dependency submission + dependency_graph_autosubmit_action_options CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable // A description of the code security configuration description *string // The enforcement status for a security configuration @@ -93,6 +97,16 @@ func (m *CodeSecurityConfiguration) GetDependabotSecurityUpdates()(*CodeSecurity func (m *CodeSecurityConfiguration) GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph) { return m.dependency_graph } +// GetDependencyGraphAutosubmitAction gets the dependency_graph_autosubmit_action property value. The enablement status of Automatic dependency submission +// returns a *CodeSecurityConfiguration_dependency_graph_autosubmit_action when successful +func (m *CodeSecurityConfiguration) GetDependencyGraphAutosubmitAction()(*CodeSecurityConfiguration_dependency_graph_autosubmit_action) { + return m.dependency_graph_autosubmit_action +} +// GetDependencyGraphAutosubmitActionOptions gets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +// returns a CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable when successful +func (m *CodeSecurityConfiguration) GetDependencyGraphAutosubmitActionOptions()(CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable) { + return m.dependency_graph_autosubmit_action_options +} // GetDescription gets the description property value. A description of the code security configuration // returns a *string when successful func (m *CodeSecurityConfiguration) GetDescription()(*string) { @@ -167,6 +181,26 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["dependency_graph_autosubmit_action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_dependency_graph_autosubmit_action) + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphAutosubmitAction(val.(*CodeSecurityConfiguration_dependency_graph_autosubmit_action)) + } + return nil + } + res["dependency_graph_autosubmit_action_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphAutosubmitActionOptions(val.(CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable)) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -382,6 +416,19 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetDependencyGraphAutosubmitAction() != nil { + cast := (*m.GetDependencyGraphAutosubmitAction()).String() + err := writer.WriteStringValue("dependency_graph_autosubmit_action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dependency_graph_autosubmit_action_options", m.GetDependencyGraphAutosubmitActionOptions()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -496,6 +543,14 @@ func (m *CodeSecurityConfiguration) SetDependabotSecurityUpdates(value *CodeSecu func (m *CodeSecurityConfiguration) SetDependencyGraph(value *CodeSecurityConfiguration_dependency_graph)() { m.dependency_graph = value } +// SetDependencyGraphAutosubmitAction sets the dependency_graph_autosubmit_action property value. The enablement status of Automatic dependency submission +func (m *CodeSecurityConfiguration) SetDependencyGraphAutosubmitAction(value *CodeSecurityConfiguration_dependency_graph_autosubmit_action)() { + m.dependency_graph_autosubmit_action = value +} +// SetDependencyGraphAutosubmitActionOptions sets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +func (m *CodeSecurityConfiguration) SetDependencyGraphAutosubmitActionOptions(value CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable)() { + m.dependency_graph_autosubmit_action_options = value +} // SetDescription sets the description property value. A description of the code security configuration func (m *CodeSecurityConfiguration) SetDescription(value *string)() { m.description = value @@ -553,6 +608,8 @@ type CodeSecurityConfigurationable interface { GetDependabotAlerts()(*CodeSecurityConfiguration_dependabot_alerts) GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates) GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph) + GetDependencyGraphAutosubmitAction()(*CodeSecurityConfiguration_dependency_graph_autosubmit_action) + GetDependencyGraphAutosubmitActionOptions()(CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable) GetDescription()(*string) GetEnforcement()(*CodeSecurityConfiguration_enforcement) GetHtmlUrl()(*string) @@ -571,6 +628,8 @@ type CodeSecurityConfigurationable interface { SetDependabotAlerts(value *CodeSecurityConfiguration_dependabot_alerts)() SetDependabotSecurityUpdates(value *CodeSecurityConfiguration_dependabot_security_updates)() SetDependencyGraph(value *CodeSecurityConfiguration_dependency_graph)() + SetDependencyGraphAutosubmitAction(value *CodeSecurityConfiguration_dependency_graph_autosubmit_action)() + SetDependencyGraphAutosubmitActionOptions(value CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable)() SetDescription(value *string)() SetEnforcement(value *CodeSecurityConfiguration_enforcement)() SetHtmlUrl(value *string)() diff --git a/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action.go b/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action.go new file mode 100644 index 00000000..502d9e51 --- /dev/null +++ b/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The enablement status of Automatic dependency submission +type CodeSecurityConfiguration_dependency_graph_autosubmit_action int + +const ( + ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION CodeSecurityConfiguration_dependency_graph_autosubmit_action = iota + DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION +) + +func (i CodeSecurityConfiguration_dependency_graph_autosubmit_action) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_dependency_graph_autosubmit_action(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + default: + return 0, errors.New("Unknown CodeSecurityConfiguration_dependency_graph_autosubmit_action value: " + v) + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_dependency_graph_autosubmit_action(values []CodeSecurityConfiguration_dependency_graph_autosubmit_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_dependency_graph_autosubmit_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action_options.go b/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action_options.go new file mode 100644 index 00000000..c0a7cf8e --- /dev/null +++ b/pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action_options.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeSecurityConfiguration_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission +type CodeSecurityConfiguration_dependency_graph_autosubmit_action_options struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + labeled_runners *bool +} +// NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options instantiates a new CodeSecurityConfiguration_dependency_graph_autosubmit_action_options and sets the default values. +func NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options()(*CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) { + m := &CodeSecurityConfiguration_dependency_graph_autosubmit_action_options{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options(), 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 *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labeled_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLabeledRunners(val) + } + return nil + } + return res +} +// GetLabeledRunners gets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +// returns a *bool when successful +func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) { + return m.labeled_runners +} +// Serialize serializes information the current object +func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("labeled_runners", m.GetLabeledRunners()) + 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 *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabeledRunners sets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() { + m.labeled_runners = value +} +type CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabeledRunners()(*bool) + SetLabeledRunners(value *bool)() +} diff --git a/pkg/github/models/copilot_seat_details.go b/pkg/github/models/copilot_seat_details.go index 9ddf50ae..87e1c2b1 100644 --- a/pkg/github/models/copilot_seat_details.go +++ b/pkg/github/models/copilot_seat_details.go @@ -8,7 +8,7 @@ import ( // CopilotSeatDetails information about a Copilot Business seat assignment for a user, team, or organization. type CopilotSeatDetails struct { // The assignee that has been granted access to GitHub Copilot. - assignee CopilotSeatDetails_CopilotSeatDetails_assigneeable + assignee CopilotSeatDetails_assigneeable // The team through which the assignee is granted access to GitHub Copilot, if applicable. assigning_team CopilotSeatDetails_CopilotSeatDetails_assigning_teamable // Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. @@ -24,98 +24,6 @@ type CopilotSeatDetails struct { // Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time } -// CopilotSeatDetails_CopilotSeatDetails_assignee composed type wrapper for classes Organizationable, SimpleUserable, Teamable -type CopilotSeatDetails_CopilotSeatDetails_assignee struct { - // Composed type representation for type Organizationable - organization Organizationable - // Composed type representation for type SimpleUserable - simpleUser SimpleUserable - // Composed type representation for type Teamable - team Teamable -} -// NewCopilotSeatDetails_CopilotSeatDetails_assignee instantiates a new CopilotSeatDetails_CopilotSeatDetails_assignee and sets the default values. -func NewCopilotSeatDetails_CopilotSeatDetails_assignee()(*CopilotSeatDetails_CopilotSeatDetails_assignee) { - m := &CopilotSeatDetails_CopilotSeatDetails_assignee{ - } - return m -} -// CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewCopilotSeatDetails_CopilotSeatDetails_assignee() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - } - } - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetIsComposedType()(bool) { - return true -} -// GetOrganization gets the organization property value. Composed type representation for type Organizationable -// returns a Organizationable when successful -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetOrganization()(Organizationable) { - return m.organization -} -// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable -// returns a SimpleUserable when successful -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetSimpleUser()(SimpleUserable) { - return m.simpleUser -} -// GetTeam gets the team property value. Composed type representation for type Teamable -// returns a Teamable when successful -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) GetTeam()(Teamable) { - return m.team -} -// Serialize serializes information the current object -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetOrganization() != nil { - err := writer.WriteObjectValue("", m.GetOrganization()) - if err != nil { - return err - } - } else if m.GetSimpleUser() != nil { - err := writer.WriteObjectValue("", m.GetSimpleUser()) - if err != nil { - return err - } - } else if m.GetTeam() != nil { - err := writer.WriteObjectValue("", m.GetTeam()) - if err != nil { - return err - } - } - return nil -} -// SetOrganization sets the organization property value. Composed type representation for type Organizationable -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetOrganization(value Organizationable)() { - m.organization = value -} -// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetSimpleUser(value SimpleUserable)() { - m.simpleUser = value -} -// SetTeam sets the team property value. Composed type representation for type Teamable -func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetTeam(value Teamable)() { - m.team = value -} // CopilotSeatDetails_CopilotSeatDetails_assigning_team composed type wrapper for classes EnterpriseTeamable, Teamable type CopilotSeatDetails_CopilotSeatDetails_assigning_team struct { // Composed type representation for type EnterpriseTeamable @@ -192,15 +100,6 @@ func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetEnterpriseTeam func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetTeam(value Teamable)() { m.team = value } -type CopilotSeatDetails_CopilotSeatDetails_assigneeable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetOrganization()(Organizationable) - GetSimpleUser()(SimpleUserable) - GetTeam()(Teamable) - SetOrganization(value Organizationable)() - SetSimpleUser(value SimpleUserable)() - SetTeam(value Teamable)() -} type CopilotSeatDetails_CopilotSeatDetails_assigning_teamable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetEnterpriseTeam()(EnterpriseTeamable) @@ -220,8 +119,8 @@ func CreateCopilotSeatDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26 return NewCopilotSeatDetails(), nil } // GetAssignee gets the assignee property value. The assignee that has been granted access to GitHub Copilot. -// returns a CopilotSeatDetails_CopilotSeatDetails_assigneeable when successful -func (m *CopilotSeatDetails) GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) { +// returns a CopilotSeatDetails_assigneeable when successful +func (m *CopilotSeatDetails) GetAssignee()(CopilotSeatDetails_assigneeable) { return m.assignee } // GetAssigningTeam gets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. @@ -239,12 +138,12 @@ func (m *CopilotSeatDetails) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6 func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateCopilotSeatDetails_CopilotSeatDetails_assigneeFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateCopilotSeatDetails_assigneeFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetAssignee(val.(CopilotSeatDetails_CopilotSeatDetails_assigneeable)) + m.SetAssignee(val.(CopilotSeatDetails_assigneeable)) } return nil } @@ -398,7 +297,7 @@ func (m *CopilotSeatDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return nil } // SetAssignee sets the assignee property value. The assignee that has been granted access to GitHub Copilot. -func (m *CopilotSeatDetails) SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() { +func (m *CopilotSeatDetails) SetAssignee(value CopilotSeatDetails_assigneeable)() { m.assignee = value } // SetAssigningTeam sets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. @@ -431,7 +330,7 @@ func (m *CopilotSeatDetails) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97 } type CopilotSeatDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) + GetAssignee()(CopilotSeatDetails_assigneeable) GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -439,7 +338,7 @@ type CopilotSeatDetailsable interface { GetOrganization()(CopilotSeatDetails_organizationable) GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() + SetAssignee(value CopilotSeatDetails_assigneeable)() SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastActivityAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/copilot_seat_details_assignee.go b/pkg/github/models/copilot_seat_details_assignee.go new file mode 100644 index 00000000..1daa439e --- /dev/null +++ b/pkg/github/models/copilot_seat_details_assignee.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotSeatDetails_assignee the assignee that has been granted access to GitHub Copilot. +type CopilotSeatDetails_assignee struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewCopilotSeatDetails_assignee instantiates a new CopilotSeatDetails_assignee and sets the default values. +func NewCopilotSeatDetails_assignee()(*CopilotSeatDetails_assignee) { + m := &CopilotSeatDetails_assignee{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotSeatDetails_assigneeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_assigneeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotSeatDetails_assignee(), 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 *CopilotSeatDetails_assignee) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_assignee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_assignee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *CopilotSeatDetails_assignee) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type CopilotSeatDetails_assigneeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/org_custom_property.go b/pkg/github/models/custom_property.go similarity index 61% rename from pkg/github/models/org_custom_property.go rename to pkg/github/models/custom_property.go index 24d49e4b..b41f3d9e 100644 --- a/pkg/github/models/org_custom_property.go +++ b/pkg/github/models/custom_property.go @@ -4,40 +4,42 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// OrgCustomProperty custom property defined on an organization -type OrgCustomProperty struct { +// CustomProperty custom property defined on an organization +type CustomProperty struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // An ordered list of the allowed values of the property.The property can have up to 200 allowed values. allowed_values []string // Default value of the property - default_value OrgCustomProperty_OrgCustomProperty_default_valueable + default_value CustomProperty_CustomProperty_default_valueable // Short description of the property description *string // The name of the property property_name *string // Whether the property is required. required *bool + // The URL that can be used to fetch, update, or delete info about this property via the API. + url *string // The type of the value for the property - value_type *OrgCustomProperty_value_type + value_type *CustomProperty_value_type // Who can edit the values of the property - values_editable_by *OrgCustomProperty_values_editable_by + values_editable_by *CustomProperty_values_editable_by } -// OrgCustomProperty_OrgCustomProperty_default_value composed type wrapper for classes string -type OrgCustomProperty_OrgCustomProperty_default_value struct { +// CustomProperty_CustomProperty_default_value composed type wrapper for classes string +type CustomProperty_CustomProperty_default_value struct { // Composed type representation for type string string *string } -// NewOrgCustomProperty_OrgCustomProperty_default_value instantiates a new OrgCustomProperty_OrgCustomProperty_default_value and sets the default values. -func NewOrgCustomProperty_OrgCustomProperty_default_value()(*OrgCustomProperty_OrgCustomProperty_default_value) { - m := &OrgCustomProperty_OrgCustomProperty_default_value{ +// NewCustomProperty_CustomProperty_default_value instantiates a new CustomProperty_CustomProperty_default_value and sets the default values. +func NewCustomProperty_CustomProperty_default_value()(*CustomProperty_CustomProperty_default_value) { + m := &CustomProperty_CustomProperty_default_value{ } return m } -// CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateCustomProperty_CustomProperty_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewOrgCustomProperty_OrgCustomProperty_default_value() +func CreateCustomProperty_CustomProperty_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCustomProperty_CustomProperty_default_value() if parseNode != nil { mappingValueNode, err := parseNode.GetChildNode("") if err != nil { @@ -62,21 +64,21 @@ func CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorVal } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *CustomProperty_CustomProperty_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful -func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetIsComposedType()(bool) { +func (m *CustomProperty_CustomProperty_default_value) GetIsComposedType()(bool) { return true } // GetString gets the string property value. Composed type representation for type string // returns a *string when successful -func (m *OrgCustomProperty_OrgCustomProperty_default_value) GetString()(*string) { +func (m *CustomProperty_CustomProperty_default_value) GetString()(*string) { return m.string } // Serialize serializes information the current object -func (m *OrgCustomProperty_OrgCustomProperty_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *CustomProperty_CustomProperty_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetString() != nil { err := writer.WriteStringValue("", m.GetString()) if err != nil { @@ -86,49 +88,49 @@ func (m *OrgCustomProperty_OrgCustomProperty_default_value) Serialize(writer i87 return nil } // SetString sets the string property value. Composed type representation for type string -func (m *OrgCustomProperty_OrgCustomProperty_default_value) SetString(value *string)() { +func (m *CustomProperty_CustomProperty_default_value) SetString(value *string)() { m.string = value } -type OrgCustomProperty_OrgCustomProperty_default_valueable interface { +type CustomProperty_CustomProperty_default_valueable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetString()(*string) SetString(value *string)() } -// NewOrgCustomProperty instantiates a new OrgCustomProperty and sets the default values. -func NewOrgCustomProperty()(*OrgCustomProperty) { - m := &OrgCustomProperty{ +// NewCustomProperty instantiates a new CustomProperty and sets the default values. +func NewCustomProperty()(*CustomProperty) { + m := &CustomProperty{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateOrgCustomPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateCustomPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateOrgCustomPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewOrgCustomProperty(), nil +func CreateCustomPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomProperty(), 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 *OrgCustomProperty) GetAdditionalData()(map[string]any) { +func (m *CustomProperty) GetAdditionalData()(map[string]any) { return m.additionalData } // GetAllowedValues gets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. // returns a []string when successful -func (m *OrgCustomProperty) GetAllowedValues()([]string) { +func (m *CustomProperty) GetAllowedValues()([]string) { return m.allowed_values } // GetDefaultValue gets the default_value property value. Default value of the property -// returns a OrgCustomProperty_OrgCustomProperty_default_valueable when successful -func (m *OrgCustomProperty) GetDefaultValue()(OrgCustomProperty_OrgCustomProperty_default_valueable) { +// returns a CustomProperty_CustomProperty_default_valueable when successful +func (m *CustomProperty) GetDefaultValue()(CustomProperty_CustomProperty_default_valueable) { return m.default_value } // GetDescription gets the description property value. Short description of the property // returns a *string when successful -func (m *OrgCustomProperty) GetDescription()(*string) { +func (m *CustomProperty) GetDescription()(*string) { return m.description } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *OrgCustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *CustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["allowed_values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -147,12 +149,12 @@ func (m *OrgCustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330 return nil } res["default_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateOrgCustomProperty_OrgCustomProperty_default_valueFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateCustomProperty_CustomProperty_default_valueFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetDefaultValue(val.(OrgCustomProperty_OrgCustomProperty_default_valueable)) + m.SetDefaultValue(val.(CustomProperty_CustomProperty_default_valueable)) } return nil } @@ -186,23 +188,33 @@ func (m *OrgCustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } res["value_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ParseOrgCustomProperty_value_type) + val, err := n.GetEnumValue(ParseCustomProperty_value_type) if err != nil { return err } if val != nil { - m.SetValueType(val.(*OrgCustomProperty_value_type)) + m.SetValueType(val.(*CustomProperty_value_type)) } return nil } res["values_editable_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ParseOrgCustomProperty_values_editable_by) + val, err := n.GetEnumValue(ParseCustomProperty_values_editable_by) if err != nil { return err } if val != nil { - m.SetValuesEditableBy(val.(*OrgCustomProperty_values_editable_by)) + m.SetValuesEditableBy(val.(*CustomProperty_values_editable_by)) } return nil } @@ -210,26 +222,31 @@ func (m *OrgCustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330 } // GetPropertyName gets the property_name property value. The name of the property // returns a *string when successful -func (m *OrgCustomProperty) GetPropertyName()(*string) { +func (m *CustomProperty) GetPropertyName()(*string) { return m.property_name } // GetRequired gets the required property value. Whether the property is required. // returns a *bool when successful -func (m *OrgCustomProperty) GetRequired()(*bool) { +func (m *CustomProperty) GetRequired()(*bool) { return m.required } +// GetUrl gets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. +// returns a *string when successful +func (m *CustomProperty) GetUrl()(*string) { + return m.url +} // GetValuesEditableBy gets the values_editable_by property value. Who can edit the values of the property -// returns a *OrgCustomProperty_values_editable_by when successful -func (m *OrgCustomProperty) GetValuesEditableBy()(*OrgCustomProperty_values_editable_by) { +// returns a *CustomProperty_values_editable_by when successful +func (m *CustomProperty) GetValuesEditableBy()(*CustomProperty_values_editable_by) { return m.values_editable_by } // GetValueType gets the value_type property value. The type of the value for the property -// returns a *OrgCustomProperty_value_type when successful -func (m *OrgCustomProperty) GetValueType()(*OrgCustomProperty_value_type) { +// returns a *CustomProperty_value_type when successful +func (m *CustomProperty) GetValueType()(*CustomProperty_value_type) { return m.value_type } // Serialize serializes information the current object -func (m *OrgCustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *CustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetAllowedValues() != nil { err := writer.WriteCollectionOfStringValues("allowed_values", m.GetAllowedValues()) if err != nil { @@ -260,6 +277,12 @@ func (m *OrgCustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } if m.GetValuesEditableBy() != nil { cast := (*m.GetValuesEditableBy()).String() err := writer.WriteStringValue("values_editable_by", &cast) @@ -283,52 +306,58 @@ func (m *OrgCustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27 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 *OrgCustomProperty) SetAdditionalData(value map[string]any)() { +func (m *CustomProperty) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetAllowedValues sets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. -func (m *OrgCustomProperty) SetAllowedValues(value []string)() { +func (m *CustomProperty) SetAllowedValues(value []string)() { m.allowed_values = value } // SetDefaultValue sets the default_value property value. Default value of the property -func (m *OrgCustomProperty) SetDefaultValue(value OrgCustomProperty_OrgCustomProperty_default_valueable)() { +func (m *CustomProperty) SetDefaultValue(value CustomProperty_CustomProperty_default_valueable)() { m.default_value = value } // SetDescription sets the description property value. Short description of the property -func (m *OrgCustomProperty) SetDescription(value *string)() { +func (m *CustomProperty) SetDescription(value *string)() { m.description = value } // SetPropertyName sets the property_name property value. The name of the property -func (m *OrgCustomProperty) SetPropertyName(value *string)() { +func (m *CustomProperty) SetPropertyName(value *string)() { m.property_name = value } // SetRequired sets the required property value. Whether the property is required. -func (m *OrgCustomProperty) SetRequired(value *bool)() { +func (m *CustomProperty) SetRequired(value *bool)() { m.required = value } +// SetUrl sets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. +func (m *CustomProperty) SetUrl(value *string)() { + m.url = value +} // SetValuesEditableBy sets the values_editable_by property value. Who can edit the values of the property -func (m *OrgCustomProperty) SetValuesEditableBy(value *OrgCustomProperty_values_editable_by)() { +func (m *CustomProperty) SetValuesEditableBy(value *CustomProperty_values_editable_by)() { m.values_editable_by = value } // SetValueType sets the value_type property value. The type of the value for the property -func (m *OrgCustomProperty) SetValueType(value *OrgCustomProperty_value_type)() { +func (m *CustomProperty) SetValueType(value *CustomProperty_value_type)() { m.value_type = value } -type OrgCustomPropertyable interface { +type CustomPropertyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAllowedValues()([]string) - GetDefaultValue()(OrgCustomProperty_OrgCustomProperty_default_valueable) + GetDefaultValue()(CustomProperty_CustomProperty_default_valueable) GetDescription()(*string) GetPropertyName()(*string) GetRequired()(*bool) - GetValuesEditableBy()(*OrgCustomProperty_values_editable_by) - GetValueType()(*OrgCustomProperty_value_type) + GetUrl()(*string) + GetValuesEditableBy()(*CustomProperty_values_editable_by) + GetValueType()(*CustomProperty_value_type) SetAllowedValues(value []string)() - SetDefaultValue(value OrgCustomProperty_OrgCustomProperty_default_valueable)() + SetDefaultValue(value CustomProperty_CustomProperty_default_valueable)() SetDescription(value *string)() SetPropertyName(value *string)() SetRequired(value *bool)() - SetValuesEditableBy(value *OrgCustomProperty_values_editable_by)() - SetValueType(value *OrgCustomProperty_value_type)() + SetUrl(value *string)() + SetValuesEditableBy(value *CustomProperty_values_editable_by)() + SetValueType(value *CustomProperty_value_type)() } diff --git a/pkg/github/models/custom_property_value_type.go b/pkg/github/models/custom_property_value_type.go new file mode 100644 index 00000000..2554677b --- /dev/null +++ b/pkg/github/models/custom_property_value_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// The type of the value for the property +type CustomProperty_value_type int + +const ( + STRING_CUSTOMPROPERTY_VALUE_TYPE CustomProperty_value_type = iota + SINGLE_SELECT_CUSTOMPROPERTY_VALUE_TYPE + MULTI_SELECT_CUSTOMPROPERTY_VALUE_TYPE + TRUE_FALSE_CUSTOMPROPERTY_VALUE_TYPE +) + +func (i CustomProperty_value_type) String() string { + return []string{"string", "single_select", "multi_select", "true_false"}[i] +} +func ParseCustomProperty_value_type(v string) (any, error) { + result := STRING_CUSTOMPROPERTY_VALUE_TYPE + switch v { + case "string": + result = STRING_CUSTOMPROPERTY_VALUE_TYPE + case "single_select": + result = SINGLE_SELECT_CUSTOMPROPERTY_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_CUSTOMPROPERTY_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_CUSTOMPROPERTY_VALUE_TYPE + default: + return 0, errors.New("Unknown CustomProperty_value_type value: " + v) + } + return &result, nil +} +func SerializeCustomProperty_value_type(values []CustomProperty_value_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CustomProperty_value_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/custom_property_values_editable_by.go b/pkg/github/models/custom_property_values_editable_by.go new file mode 100644 index 00000000..f26e6e2e --- /dev/null +++ b/pkg/github/models/custom_property_values_editable_by.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Who can edit the values of the property +type CustomProperty_values_editable_by int + +const ( + ORG_ACTORS_CUSTOMPROPERTY_VALUES_EDITABLE_BY CustomProperty_values_editable_by = iota + ORG_AND_REPO_ACTORS_CUSTOMPROPERTY_VALUES_EDITABLE_BY +) + +func (i CustomProperty_values_editable_by) String() string { + return []string{"org_actors", "org_and_repo_actors"}[i] +} +func ParseCustomProperty_values_editable_by(v string) (any, error) { + result := ORG_ACTORS_CUSTOMPROPERTY_VALUES_EDITABLE_BY + switch v { + case "org_actors": + result = ORG_ACTORS_CUSTOMPROPERTY_VALUES_EDITABLE_BY + case "org_and_repo_actors": + result = ORG_AND_REPO_ACTORS_CUSTOMPROPERTY_VALUES_EDITABLE_BY + default: + return 0, errors.New("Unknown CustomProperty_values_editable_by value: " + v) + } + return &result, nil +} +func SerializeCustomProperty_values_editable_by(values []CustomProperty_values_editable_by) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CustomProperty_values_editable_by) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/org_custom_property_value_type.go b/pkg/github/models/org_custom_property_value_type.go deleted file mode 100644 index 7ad5c0ce..00000000 --- a/pkg/github/models/org_custom_property_value_type.go +++ /dev/null @@ -1,43 +0,0 @@ -package models -import ( - "errors" -) -// The type of the value for the property -type OrgCustomProperty_value_type int - -const ( - STRING_ORGCUSTOMPROPERTY_VALUE_TYPE OrgCustomProperty_value_type = iota - SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE - MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE - TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE -) - -func (i OrgCustomProperty_value_type) String() string { - return []string{"string", "single_select", "multi_select", "true_false"}[i] -} -func ParseOrgCustomProperty_value_type(v string) (any, error) { - result := STRING_ORGCUSTOMPROPERTY_VALUE_TYPE - switch v { - case "string": - result = STRING_ORGCUSTOMPROPERTY_VALUE_TYPE - case "single_select": - result = SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE - case "multi_select": - result = MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE - case "true_false": - result = TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE - default: - return 0, errors.New("Unknown OrgCustomProperty_value_type value: " + v) - } - return &result, nil -} -func SerializeOrgCustomProperty_value_type(values []OrgCustomProperty_value_type) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result -} -func (i OrgCustomProperty_value_type) isMultiValue() bool { - return false -} diff --git a/pkg/github/models/org_custom_property_values_editable_by.go b/pkg/github/models/org_custom_property_values_editable_by.go deleted file mode 100644 index a21cfec6..00000000 --- a/pkg/github/models/org_custom_property_values_editable_by.go +++ /dev/null @@ -1,37 +0,0 @@ -package models -import ( - "errors" -) -// Who can edit the values of the property -type OrgCustomProperty_values_editable_by int - -const ( - ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY OrgCustomProperty_values_editable_by = iota - ORG_AND_REPO_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY -) - -func (i OrgCustomProperty_values_editable_by) String() string { - return []string{"org_actors", "org_and_repo_actors"}[i] -} -func ParseOrgCustomProperty_values_editable_by(v string) (any, error) { - result := ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY - switch v { - case "org_actors": - result = ORG_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY - case "org_and_repo_actors": - result = ORG_AND_REPO_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY - default: - return 0, errors.New("Unknown OrgCustomProperty_values_editable_by value: " + v) - } - return &result, nil -} -func SerializeOrgCustomProperty_values_editable_by(values []OrgCustomProperty_values_editable_by) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result -} -func (i OrgCustomProperty_values_editable_by) isMultiValue() bool { - return false -} diff --git a/pkg/github/models/organization.go b/pkg/github/models/organization.go deleted file mode 100644 index 9f2d6908..00000000 --- a/pkg/github/models/organization.go +++ /dev/null @@ -1,894 +0,0 @@ -package models - -import ( - i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -// Organization gitHub account for managing multiple users, teams, and repositories -type Organization struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]any - // The avatar_url property - avatar_url *string - // Display blog url for the organization - blog *string - // Display company name for the organization - company *string - // The created_at property - created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The description property - description *string - // Display email for the organization - email *string - // The events_url property - events_url *string - // The followers property - followers *int32 - // The following property - following *int32 - // Specifies if organization projects are enabled for this org - has_organization_projects *bool - // Specifies if repository projects are enabled for repositories that belong to this org - has_repository_projects *bool - // The hooks_url property - hooks_url *string - // The html_url property - html_url *string - // The id property - id *int32 - // The is_verified property - is_verified *bool - // The issues_url property - issues_url *string - // Display location for the organization - location *string - // Unique login name of the organization - login *string - // The members_url property - members_url *string - // Display name for the organization - name *string - // The node_id property - node_id *string - // The plan property - plan Organization_planable - // The public_gists property - public_gists *int32 - // The public_members_url property - public_members_url *string - // The public_repos property - public_repos *int32 - // The repos_url property - repos_url *string - // The type property - typeEscaped *string - // The updated_at property - updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // URL for the organization - url *string -} -// NewOrganization instantiates a new Organization and sets the default values. -func NewOrganization()(*Organization) { - m := &Organization{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewOrganization(), 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 *Organization) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAvatarUrl gets the avatar_url property value. The avatar_url property -// returns a *string when successful -func (m *Organization) GetAvatarUrl()(*string) { - return m.avatar_url -} -// GetBlog gets the blog property value. Display blog url for the organization -// returns a *string when successful -func (m *Organization) GetBlog()(*string) { - return m.blog -} -// GetCompany gets the company property value. Display company name for the organization -// returns a *string when successful -func (m *Organization) GetCompany()(*string) { - return m.company -} -// GetCreatedAt gets the created_at property value. The created_at property -// returns a *Time when successful -func (m *Organization) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.created_at -} -// GetDescription gets the description property value. The description property -// returns a *string when successful -func (m *Organization) GetDescription()(*string) { - return m.description -} -// GetEmail gets the email property value. Display email for the organization -// returns a *string when successful -func (m *Organization) GetEmail()(*string) { - return m.email -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *Organization) GetEventsUrl()(*string) { - return m.events_url -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *Organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetAvatarUrl(val) - } - return nil - } - res["blog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetBlog(val) - } - return nil - } - res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCompany(val) - } - return nil - } - res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetTimeValue() - if err != nil { - return err - } - if val != nil { - m.SetCreatedAt(val) - } - return nil - } - res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDescription(val) - } - return nil - } - res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetEmail(val) - } - return nil - } - res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetEventsUrl(val) - } - return nil - } - res["followers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetFollowers(val) - } - return nil - } - res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetFollowing(val) - } - return nil - } - res["has_organization_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasOrganizationProjects(val) - } - return nil - } - res["has_repository_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasRepositoryProjects(val) - } - return nil - } - res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetHooksUrl(val) - } - return nil - } - res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetHtmlUrl(val) - } - return nil - } - res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetId(val) - } - return nil - } - res["is_verified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetIsVerified(val) - } - return nil - } - res["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIssuesUrl(val) - } - return nil - } - res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLocation(val) - } - return nil - } - res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLogin(val) - } - return nil - } - res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMembersUrl(val) - } - return nil - } - res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetName(val) - } - return nil - } - res["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetNodeId(val) - } - return nil - } - res["plan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateOrganization_planFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetPlan(val.(Organization_planable)) - } - return nil - } - res["public_gists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetPublicGists(val) - } - return nil - } - res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPublicMembersUrl(val) - } - return nil - } - res["public_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetPublicRepos(val) - } - return nil - } - res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReposUrl(val) - } - return nil - } - res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTypeEscaped(val) - } - return nil - } - res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetTimeValue() - if err != nil { - return err - } - if val != nil { - m.SetUpdatedAt(val) - } - return nil - } - res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUrl(val) - } - return nil - } - return res -} -// GetFollowers gets the followers property value. The followers property -// returns a *int32 when successful -func (m *Organization) GetFollowers()(*int32) { - return m.followers -} -// GetFollowing gets the following property value. The following property -// returns a *int32 when successful -func (m *Organization) GetFollowing()(*int32) { - return m.following -} -// GetHasOrganizationProjects gets the has_organization_projects property value. Specifies if organization projects are enabled for this org -// returns a *bool when successful -func (m *Organization) GetHasOrganizationProjects()(*bool) { - return m.has_organization_projects -} -// GetHasRepositoryProjects gets the has_repository_projects property value. Specifies if repository projects are enabled for repositories that belong to this org -// returns a *bool when successful -func (m *Organization) GetHasRepositoryProjects()(*bool) { - return m.has_repository_projects -} -// GetHooksUrl gets the hooks_url property value. The hooks_url property -// returns a *string when successful -func (m *Organization) GetHooksUrl()(*string) { - return m.hooks_url -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *Organization) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *Organization) GetId()(*int32) { - return m.id -} -// GetIssuesUrl gets the issues_url property value. The issues_url property -// returns a *string when successful -func (m *Organization) GetIssuesUrl()(*string) { - return m.issues_url -} -// GetIsVerified gets the is_verified property value. The is_verified property -// returns a *bool when successful -func (m *Organization) GetIsVerified()(*bool) { - return m.is_verified -} -// GetLocation gets the location property value. Display location for the organization -// returns a *string when successful -func (m *Organization) GetLocation()(*string) { - return m.location -} -// GetLogin gets the login property value. Unique login name of the organization -// returns a *string when successful -func (m *Organization) GetLogin()(*string) { - return m.login -} -// GetMembersUrl gets the members_url property value. The members_url property -// returns a *string when successful -func (m *Organization) GetMembersUrl()(*string) { - return m.members_url -} -// GetName gets the name property value. Display name for the organization -// returns a *string when successful -func (m *Organization) GetName()(*string) { - return m.name -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *Organization) GetNodeId()(*string) { - return m.node_id -} -// GetPlan gets the plan property value. The plan property -// returns a Organization_planable when successful -func (m *Organization) GetPlan()(Organization_planable) { - return m.plan -} -// GetPublicGists gets the public_gists property value. The public_gists property -// returns a *int32 when successful -func (m *Organization) GetPublicGists()(*int32) { - return m.public_gists -} -// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property -// returns a *string when successful -func (m *Organization) GetPublicMembersUrl()(*string) { - return m.public_members_url -} -// GetPublicRepos gets the public_repos property value. The public_repos property -// returns a *int32 when successful -func (m *Organization) GetPublicRepos()(*int32) { - return m.public_repos -} -// GetReposUrl gets the repos_url property value. The repos_url property -// returns a *string when successful -func (m *Organization) GetReposUrl()(*string) { - return m.repos_url -} -// GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *Organization) GetTypeEscaped()(*string) { - return m.typeEscaped -} -// GetUpdatedAt gets the updated_at property value. The updated_at property -// returns a *Time when successful -func (m *Organization) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.updated_at -} -// GetUrl gets the url property value. URL for the organization -// returns a *string when successful -func (m *Organization) GetUrl()(*string) { - return m.url -} -// Serialize serializes information the current object -func (m *Organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("blog", m.GetBlog()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("company", m.GetCompany()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("description", m.GetDescription()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("email", m.GetEmail()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("followers", m.GetFollowers()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("following", m.GetFollowing()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_organization_projects", m.GetHasOrganizationProjects()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_repository_projects", m.GetHasRepositoryProjects()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("id", m.GetId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("is_verified", m.GetIsVerified()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("location", m.GetLocation()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("login", m.GetLogin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("members_url", m.GetMembersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("name", m.GetName()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("node_id", m.GetNodeId()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("plan", m.GetPlan()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("public_gists", m.GetPublicGists()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("public_repos", m.GetPublicRepos()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("repos_url", m.GetReposUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("url", m.GetUrl()) - 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 *Organization) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAvatarUrl sets the avatar_url property value. The avatar_url property -func (m *Organization) SetAvatarUrl(value *string)() { - m.avatar_url = value -} -// SetBlog sets the blog property value. Display blog url for the organization -func (m *Organization) SetBlog(value *string)() { - m.blog = value -} -// SetCompany sets the company property value. Display company name for the organization -func (m *Organization) SetCompany(value *string)() { - m.company = value -} -// SetCreatedAt sets the created_at property value. The created_at property -func (m *Organization) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.created_at = value -} -// SetDescription sets the description property value. The description property -func (m *Organization) SetDescription(value *string)() { - m.description = value -} -// SetEmail sets the email property value. Display email for the organization -func (m *Organization) SetEmail(value *string)() { - m.email = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *Organization) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFollowers sets the followers property value. The followers property -func (m *Organization) SetFollowers(value *int32)() { - m.followers = value -} -// SetFollowing sets the following property value. The following property -func (m *Organization) SetFollowing(value *int32)() { - m.following = value -} -// SetHasOrganizationProjects sets the has_organization_projects property value. Specifies if organization projects are enabled for this org -func (m *Organization) SetHasOrganizationProjects(value *bool)() { - m.has_organization_projects = value -} -// SetHasRepositoryProjects sets the has_repository_projects property value. Specifies if repository projects are enabled for repositories that belong to this org -func (m *Organization) SetHasRepositoryProjects(value *bool)() { - m.has_repository_projects = value -} -// SetHooksUrl sets the hooks_url property value. The hooks_url property -func (m *Organization) SetHooksUrl(value *string)() { - m.hooks_url = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *Organization) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *Organization) SetId(value *int32)() { - m.id = value -} -// SetIssuesUrl sets the issues_url property value. The issues_url property -func (m *Organization) SetIssuesUrl(value *string)() { - m.issues_url = value -} -// SetIsVerified sets the is_verified property value. The is_verified property -func (m *Organization) SetIsVerified(value *bool)() { - m.is_verified = value -} -// SetLocation sets the location property value. Display location for the organization -func (m *Organization) SetLocation(value *string)() { - m.location = value -} -// SetLogin sets the login property value. Unique login name of the organization -func (m *Organization) SetLogin(value *string)() { - m.login = value -} -// SetMembersUrl sets the members_url property value. The members_url property -func (m *Organization) SetMembersUrl(value *string)() { - m.members_url = value -} -// SetName sets the name property value. Display name for the organization -func (m *Organization) SetName(value *string)() { - m.name = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *Organization) SetNodeId(value *string)() { - m.node_id = value -} -// SetPlan sets the plan property value. The plan property -func (m *Organization) SetPlan(value Organization_planable)() { - m.plan = value -} -// SetPublicGists sets the public_gists property value. The public_gists property -func (m *Organization) SetPublicGists(value *int32)() { - m.public_gists = value -} -// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property -func (m *Organization) SetPublicMembersUrl(value *string)() { - m.public_members_url = value -} -// SetPublicRepos sets the public_repos property value. The public_repos property -func (m *Organization) SetPublicRepos(value *int32)() { - m.public_repos = value -} -// SetReposUrl sets the repos_url property value. The repos_url property -func (m *Organization) SetReposUrl(value *string)() { - m.repos_url = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *Organization) SetTypeEscaped(value *string)() { - m.typeEscaped = value -} -// SetUpdatedAt sets the updated_at property value. The updated_at property -func (m *Organization) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.updated_at = value -} -// SetUrl sets the url property value. URL for the organization -func (m *Organization) SetUrl(value *string)() { - m.url = value -} -type Organizationable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAvatarUrl()(*string) - GetBlog()(*string) - GetCompany()(*string) - GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetDescription()(*string) - GetEmail()(*string) - GetEventsUrl()(*string) - GetFollowers()(*int32) - GetFollowing()(*int32) - GetHasOrganizationProjects()(*bool) - GetHasRepositoryProjects()(*bool) - GetHooksUrl()(*string) - GetHtmlUrl()(*string) - GetId()(*int32) - GetIssuesUrl()(*string) - GetIsVerified()(*bool) - GetLocation()(*string) - GetLogin()(*string) - GetMembersUrl()(*string) - GetName()(*string) - GetNodeId()(*string) - GetPlan()(Organization_planable) - GetPublicGists()(*int32) - GetPublicMembersUrl()(*string) - GetPublicRepos()(*int32) - GetReposUrl()(*string) - GetTypeEscaped()(*string) - GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetUrl()(*string) - SetAvatarUrl(value *string)() - SetBlog(value *string)() - SetCompany(value *string)() - SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetDescription(value *string)() - SetEmail(value *string)() - SetEventsUrl(value *string)() - SetFollowers(value *int32)() - SetFollowing(value *int32)() - SetHasOrganizationProjects(value *bool)() - SetHasRepositoryProjects(value *bool)() - SetHooksUrl(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int32)() - SetIssuesUrl(value *string)() - SetIsVerified(value *bool)() - SetLocation(value *string)() - SetLogin(value *string)() - SetMembersUrl(value *string)() - SetName(value *string)() - SetNodeId(value *string)() - SetPlan(value Organization_planable)() - SetPublicGists(value *int32)() - SetPublicMembersUrl(value *string)() - SetPublicRepos(value *int32)() - SetReposUrl(value *string)() - SetTypeEscaped(value *string)() - SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetUrl(value *string)() -} diff --git a/pkg/github/models/organization_plan.go b/pkg/github/models/organization_plan.go deleted file mode 100644 index 3e37d4b5..00000000 --- a/pkg/github/models/organization_plan.go +++ /dev/null @@ -1,196 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type Organization_plan struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]any - // The filled_seats property - filled_seats *int32 - // The name property - name *string - // The private_repos property - private_repos *int32 - // The seats property - seats *int32 - // The space property - space *int32 -} -// NewOrganization_plan instantiates a new Organization_plan and sets the default values. -func NewOrganization_plan()(*Organization_plan) { - m := &Organization_plan{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateOrganization_planFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateOrganization_planFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewOrganization_plan(), 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 *Organization_plan) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *Organization_plan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["filled_seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetFilledSeats(val) - } - return nil - } - res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetName(val) - } - return nil - } - res["private_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetPrivateRepos(val) - } - return nil - } - res["seats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetSeats(val) - } - return nil - } - res["space"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetSpace(val) - } - return nil - } - return res -} -// GetFilledSeats gets the filled_seats property value. The filled_seats property -// returns a *int32 when successful -func (m *Organization_plan) GetFilledSeats()(*int32) { - return m.filled_seats -} -// GetName gets the name property value. The name property -// returns a *string when successful -func (m *Organization_plan) GetName()(*string) { - return m.name -} -// GetPrivateRepos gets the private_repos property value. The private_repos property -// returns a *int32 when successful -func (m *Organization_plan) GetPrivateRepos()(*int32) { - return m.private_repos -} -// GetSeats gets the seats property value. The seats property -// returns a *int32 when successful -func (m *Organization_plan) GetSeats()(*int32) { - return m.seats -} -// GetSpace gets the space property value. The space property -// returns a *int32 when successful -func (m *Organization_plan) GetSpace()(*int32) { - return m.space -} -// Serialize serializes information the current object -func (m *Organization_plan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteInt32Value("filled_seats", m.GetFilledSeats()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("name", m.GetName()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("private_repos", m.GetPrivateRepos()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("seats", m.GetSeats()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("space", m.GetSpace()) - 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 *Organization_plan) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetFilledSeats sets the filled_seats property value. The filled_seats property -func (m *Organization_plan) SetFilledSeats(value *int32)() { - m.filled_seats = value -} -// SetName sets the name property value. The name property -func (m *Organization_plan) SetName(value *string)() { - m.name = value -} -// SetPrivateRepos sets the private_repos property value. The private_repos property -func (m *Organization_plan) SetPrivateRepos(value *int32)() { - m.private_repos = value -} -// SetSeats sets the seats property value. The seats property -func (m *Organization_plan) SetSeats(value *int32)() { - m.seats = value -} -// SetSpace sets the space property value. The space property -func (m *Organization_plan) SetSpace(value *int32)() { - m.space = value -} -type Organization_planable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetFilledSeats()(*int32) - GetName()(*string) - GetPrivateRepos()(*int32) - GetSeats()(*int32) - GetSpace()(*int32) - SetFilledSeats(value *int32)() - SetName(value *string)() - SetPrivateRepos(value *int32)() - SetSeats(value *int32)() - SetSpace(value *int32)() -} diff --git a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go index e6b3f602..42742b1b 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go +++ b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go @@ -11,10 +11,11 @@ const ( REPOSITORYROLE_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + ENTERPRISETEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE ) func (i RepositoryRulesetBypassActor_actor_type) String() string { - return []string{"Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"}[i] + return []string{"Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey", "EnterpriseTeam"}[i] } func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { result := INTEGRATION_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE @@ -29,6 +30,8 @@ func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { result = TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE case "DeployKey": result = DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "EnterpriseTeam": + result = ENTERPRISETEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE default: return 0, errors.New("Unknown RepositoryRulesetBypassActor_actor_type value: " + v) } diff --git a/pkg/github/models/secret_scanning_push_protection_bypass.go b/pkg/github/models/secret_scanning_push_protection_bypass.go new file mode 100644 index 00000000..2fe0b26c --- /dev/null +++ b/pkg/github/models/secret_scanning_push_protection_bypass.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningPushProtectionBypass struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + expire_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The reason for bypassing push protection. + reason *SecretScanningPushProtectionBypassReason + // The token type this bypass is for. + token_type *string +} +// NewSecretScanningPushProtectionBypass instantiates a new SecretScanningPushProtectionBypass and sets the default values. +func NewSecretScanningPushProtectionBypass()(*SecretScanningPushProtectionBypass) { + m := &SecretScanningPushProtectionBypass{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningPushProtectionBypassFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningPushProtectionBypassFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningPushProtectionBypass(), 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 *SecretScanningPushProtectionBypass) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetExpireAt gets the expire_at property value. The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +// returns a *Time when successful +func (m *SecretScanningPushProtectionBypass) GetExpireAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expire_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningPushProtectionBypass) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expire_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpireAt(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecretScanningPushProtectionBypassReason) + if err != nil { + return err + } + if val != nil { + m.SetReason(val.(*SecretScanningPushProtectionBypassReason)) + } + return nil + } + res["token_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenType(val) + } + return nil + } + return res +} +// GetReason gets the reason property value. The reason for bypassing push protection. +// returns a *SecretScanningPushProtectionBypassReason when successful +func (m *SecretScanningPushProtectionBypass) GetReason()(*SecretScanningPushProtectionBypassReason) { + return m.reason +} +// GetTokenType gets the token_type property value. The token type this bypass is for. +// returns a *string when successful +func (m *SecretScanningPushProtectionBypass) GetTokenType()(*string) { + return m.token_type +} +// Serialize serializes information the current object +func (m *SecretScanningPushProtectionBypass) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("expire_at", m.GetExpireAt()) + if err != nil { + return err + } + } + if m.GetReason() != nil { + cast := (*m.GetReason()).String() + err := writer.WriteStringValue("reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("token_type", m.GetTokenType()) + 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 *SecretScanningPushProtectionBypass) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetExpireAt sets the expire_at property value. The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. +func (m *SecretScanningPushProtectionBypass) SetExpireAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expire_at = value +} +// SetReason sets the reason property value. The reason for bypassing push protection. +func (m *SecretScanningPushProtectionBypass) SetReason(value *SecretScanningPushProtectionBypassReason)() { + m.reason = value +} +// SetTokenType sets the token_type property value. The token type this bypass is for. +func (m *SecretScanningPushProtectionBypass) SetTokenType(value *string)() { + m.token_type = value +} +type SecretScanningPushProtectionBypassable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpireAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReason()(*SecretScanningPushProtectionBypassReason) + GetTokenType()(*string) + SetExpireAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReason(value *SecretScanningPushProtectionBypassReason)() + SetTokenType(value *string)() +} diff --git a/pkg/github/models/secret_scanning_push_protection_bypass503_error.go b/pkg/github/models/secret_scanning_push_protection_bypass503_error.go new file mode 100644 index 00000000..7417ce2c --- /dev/null +++ b/pkg/github/models/secret_scanning_push_protection_bypass503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningPushProtectionBypass503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewSecretScanningPushProtectionBypass503Error instantiates a new SecretScanningPushProtectionBypass503Error and sets the default values. +func NewSecretScanningPushProtectionBypass503Error()(*SecretScanningPushProtectionBypass503Error) { + m := &SecretScanningPushProtectionBypass503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningPushProtectionBypass503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningPushProtectionBypass503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningPushProtectionBypass503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *SecretScanningPushProtectionBypass503Error) Error()(string) { + return m.ApiError.Error() +} +// 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 *SecretScanningPushProtectionBypass503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *SecretScanningPushProtectionBypass503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *SecretScanningPushProtectionBypass503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningPushProtectionBypass503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *SecretScanningPushProtectionBypass503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *SecretScanningPushProtectionBypass503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + 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 *SecretScanningPushProtectionBypass503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *SecretScanningPushProtectionBypass503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *SecretScanningPushProtectionBypass503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *SecretScanningPushProtectionBypass503Error) SetMessage(value *string)() { + m.message = value +} +type SecretScanningPushProtectionBypass503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/secret_scanning_push_protection_bypass_reason.go b/pkg/github/models/secret_scanning_push_protection_bypass_reason.go new file mode 100644 index 00000000..2ff0fd7d --- /dev/null +++ b/pkg/github/models/secret_scanning_push_protection_bypass_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The reason for bypassing push protection. +type SecretScanningPushProtectionBypassReason int + +const ( + FALSE_POSITIVE_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON SecretScanningPushProtectionBypassReason = iota + USED_IN_TESTS_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON + WILL_FIX_LATER_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON +) + +func (i SecretScanningPushProtectionBypassReason) String() string { + return []string{"false_positive", "used_in_tests", "will_fix_later"}[i] +} +func ParseSecretScanningPushProtectionBypassReason(v string) (any, error) { + result := FALSE_POSITIVE_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON + switch v { + case "false_positive": + result = FALSE_POSITIVE_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON + case "used_in_tests": + result = USED_IN_TESTS_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON + case "will_fix_later": + result = WILL_FIX_LATER_SECRETSCANNINGPUSHPROTECTIONBYPASSREASON + default: + return 0, errors.New("Unknown SecretScanningPushProtectionBypassReason value: " + v) + } + return &result, nil +} +func SerializeSecretScanningPushProtectionBypassReason(values []SecretScanningPushProtectionBypassReason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SecretScanningPushProtectionBypassReason) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph_autosubmit_action.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph_autosubmit_action.go new file mode 100644 index 00000000..3c63560a --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_dependency_graph_autosubmit_action.go @@ -0,0 +1,40 @@ +package configurations +import ( + "errors" +) +// The enablement status of Automatic dependency submission +type ConfigurationsPostRequestBody_dependency_graph_autosubmit_action int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION ConfigurationsPostRequestBody_dependency_graph_autosubmit_action = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION +) + +func (i ConfigurationsPostRequestBody_dependency_graph_autosubmit_action) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_dependency_graph_autosubmit_action(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_dependency_graph_autosubmit_action value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_dependency_graph_autosubmit_action(values []ConfigurationsPostRequestBody_dependency_graph_autosubmit_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_dependency_graph_autosubmit_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph_autosubmit_action.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph_autosubmit_action.go new file mode 100644 index 00000000..4781d3e5 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_dependency_graph_autosubmit_action.go @@ -0,0 +1,40 @@ +package item +import ( + "errors" +) +// The enablement status of Automatic dependency submission +type WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION +) + +func (i WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action(values []WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go index dd1e4b9d..99b49810 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go @@ -2,7 +2,7 @@ package repos import ( "errors" ) -// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +// Required when using `merge_commit_message`.The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type ReposPostRequestBody_merge_commit_title int const ( diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go index 51ceb4f6..1b55a81e 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go @@ -2,7 +2,7 @@ package repos import ( "errors" ) -// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +// Required when using `squash_merge_commit_message`.The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type ReposPostRequestBody_squash_merge_commit_title int const ( diff --git a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go index e3740858..12463397 100644 --- a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go +++ b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body.go @@ -5,6 +5,8 @@ import ( ) type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody struct { + // Feature options for Automatic dependency submission + dependency_graph_autosubmit_action_options ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable // A description of the code security configuration description *string // The name of the code security configuration. Must be unique within the organization. @@ -21,6 +23,11 @@ func NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody()(* func CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody(), nil } +// GetDependencyGraphAutosubmitActionOptions gets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +// returns a ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable) { + return m.dependency_graph_autosubmit_action_options +} // GetDescription gets the description property value. A description of the code security configuration // returns a *string when successful func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetDescription()(*string) { @@ -30,6 +37,16 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) G // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dependency_graph_autosubmit_action_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphAutosubmitActionOptions(val.(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable)) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -59,6 +76,12 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) G } // Serialize serializes information the current object func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dependency_graph_autosubmit_action_options", m.GetDependencyGraphAutosubmitActionOptions()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -73,6 +96,10 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) S } return nil } +// SetDependencyGraphAutosubmitActionOptions sets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable)() { + m.dependency_graph_autosubmit_action_options = value +} // SetDescription sets the description property value. A description of the code security configuration func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetDescription(value *string)() { m.description = value @@ -83,8 +110,10 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) S } type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable) GetDescription()(*string) GetName()(*string) + SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable)() SetDescription(value *string)() SetName(value *string)() } diff --git a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body_dependency_graph_autosubmit_action_options.go b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body_dependency_graph_autosubmit_action_options.go new file mode 100644 index 00000000..d67c0599 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_patch_request_body_dependency_graph_autosubmit_action_options.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission +type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + labeled_runners *bool +} +// NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options instantiates a new ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options and sets the default values. +func NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options()(*ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) { + m := &ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options(), 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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labeled_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLabeledRunners(val) + } + return nil + } + return res +} +// GetLabeledRunners gets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +// returns a *bool when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) { + return m.labeled_runners +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("labeled_runners", m.GetLabeledRunners()) + 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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabeledRunners sets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() { + m.labeled_runners = value +} +type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabeledRunners()(*bool) + SetLabeledRunners(value *bool)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_post_request_body.go b/pkg/github/orgs/item_code_security_configurations_post_request_body.go index b2356378..648f4bda 100644 --- a/pkg/github/orgs/item_code_security_configurations_post_request_body.go +++ b/pkg/github/orgs/item_code_security_configurations_post_request_body.go @@ -5,6 +5,8 @@ import ( ) type ItemCodeSecurityConfigurationsPostRequestBody struct { + // Feature options for Automatic dependency submission + dependency_graph_autosubmit_action_options ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable // A description of the code security configuration description *string // The name of the code security configuration. Must be unique within the organization. @@ -21,6 +23,11 @@ func NewItemCodeSecurityConfigurationsPostRequestBody()(*ItemCodeSecurityConfigu func CreateItemCodeSecurityConfigurationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewItemCodeSecurityConfigurationsPostRequestBody(), nil } +// GetDependencyGraphAutosubmitActionOptions gets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +// returns a ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable) { + return m.dependency_graph_autosubmit_action_options +} // GetDescription gets the description property value. A description of the code security configuration // returns a *string when successful func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDescription()(*string) { @@ -30,6 +37,16 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDescription()(*string // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dependency_graph_autosubmit_action_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDependencyGraphAutosubmitActionOptions(val.(ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable)) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -59,6 +76,12 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetName()(*string) { } // Serialize serializes information the current object func (m *ItemCodeSecurityConfigurationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dependency_graph_autosubmit_action_options", m.GetDependencyGraphAutosubmitActionOptions()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -73,6 +96,10 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) Serialize(writer i878a80 } return nil } +// SetDependencyGraphAutosubmitActionOptions sets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission +func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable)() { + m.dependency_graph_autosubmit_action_options = value +} // SetDescription sets the description property value. A description of the code security configuration func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetDescription(value *string)() { m.description = value @@ -83,8 +110,10 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetName(value *string)() } type ItemCodeSecurityConfigurationsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable) GetDescription()(*string) GetName()(*string) + SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable)() SetDescription(value *string)() SetName(value *string)() } diff --git a/pkg/github/orgs/item_code_security_configurations_post_request_body_dependency_graph_autosubmit_action_options.go b/pkg/github/orgs/item_code_security_configurations_post_request_body_dependency_graph_autosubmit_action_options.go new file mode 100644 index 00000000..de18c677 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_post_request_body_dependency_graph_autosubmit_action_options.go @@ -0,0 +1,81 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission +type ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + labeled_runners *bool +} +// NewItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options instantiates a new ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options and sets the default values. +func NewItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options()(*ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) { + m := &ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options(), 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 *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["labeled_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLabeledRunners(val) + } + return nil + } + return res +} +// GetLabeledRunners gets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +// returns a *bool when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) { + return m.labeled_runners +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("labeled_runners", m.GetLabeledRunners()) + 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 *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLabeledRunners sets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. +func (m *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() { + m.labeled_runners = value +} +type ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabeledRunners()(*bool) + SetLabeledRunners(value *bool)() +} diff --git a/pkg/github/orgs/item_copilot_usage_request_builder.go b/pkg/github/orgs/item_copilot_usage_request_builder.go index cc713e16..1b42a44c 100644 --- a/pkg/github/orgs/item_copilot_usage_request_builder.go +++ b/pkg/github/orgs/item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. type ItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_properties_schema_patch_request_body.go b/pkg/github/orgs/item_properties_schema_patch_request_body.go index c426848e..777d1d29 100644 --- a/pkg/github/orgs/item_properties_schema_patch_request_body.go +++ b/pkg/github/orgs/item_properties_schema_patch_request_body.go @@ -9,7 +9,7 @@ type ItemPropertiesSchemaPatchRequestBody struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The array of custom properties to create or update. - properties []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable + properties []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable } // NewItemPropertiesSchemaPatchRequestBody instantiates a new ItemPropertiesSchemaPatchRequestBody and sets the default values. func NewItemPropertiesSchemaPatchRequestBody()(*ItemPropertiesSchemaPatchRequestBody) { @@ -33,15 +33,15 @@ func (m *ItemPropertiesSchemaPatchRequestBody) GetAdditionalData()(map[string]an func (m *ItemPropertiesSchemaPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateOrgCustomPropertyFromDiscriminatorValue) + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCustomPropertyFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, len(val)) + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, len(val)) for i, v := range val { if v != nil { - res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable) + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable) } } m.SetProperties(res) @@ -51,8 +51,8 @@ func (m *ItemPropertiesSchemaPatchRequestBody) GetFieldDeserializers()(map[strin return res } // GetProperties gets the properties property value. The array of custom properties to create or update. -// returns a []OrgCustomPropertyable when successful -func (m *ItemPropertiesSchemaPatchRequestBody) GetProperties()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable) { +// returns a []CustomPropertyable when successful +func (m *ItemPropertiesSchemaPatchRequestBody) GetProperties()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable) { return m.properties } // Serialize serializes information the current object @@ -82,12 +82,12 @@ func (m *ItemPropertiesSchemaPatchRequestBody) SetAdditionalData(value map[strin m.additionalData = value } // SetProperties sets the properties property value. The array of custom properties to create or update. -func (m *ItemPropertiesSchemaPatchRequestBody) SetProperties(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable)() { +func (m *ItemPropertiesSchemaPatchRequestBody) SetProperties(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable)() { m.properties = value } type ItemPropertiesSchemaPatchRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetProperties()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable) - SetProperties(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable)() + GetProperties()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable) + SetProperties(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable)() } diff --git a/pkg/github/orgs/item_properties_schema_request_builder.go b/pkg/github/orgs/item_properties_schema_request_builder.go index 2f924b9a..6634e6df 100644 --- a/pkg/github/orgs/item_properties_schema_request_builder.go +++ b/pkg/github/orgs/item_properties_schema_request_builder.go @@ -36,13 +36,13 @@ func NewItemPropertiesSchemaRequestBuilder(rawUrl string, requestAdapter i2ae418 return NewItemPropertiesSchemaRequestBuilderInternal(urlParams, requestAdapter) } // Get gets all custom properties defined for an organization.Organization members can read these properties. -// returns a []OrgCustomPropertyable when successful +// returns a []CustomPropertyable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/orgs/custom-properties#get-all-custom-properties-for-an-organization -func (m *ItemPropertiesSchemaRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, error) { +func (m *ItemPropertiesSchemaRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -51,26 +51,26 @@ func (m *ItemPropertiesSchemaRequestBuilder) Get(ctx context.Context, requestCon "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCustomPropertyFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } - val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, len(res)) + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, len(res)) for i, v := range res { if v != nil { - val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable) + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable) } } return val, nil } // Patch creates new or updates existing custom properties defined for an organization in a batch.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. -// returns a []OrgCustomPropertyable when successful +// returns a []CustomPropertyable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization -func (m *ItemPropertiesSchemaRequestBuilder) Patch(ctx context.Context, body ItemPropertiesSchemaPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, error) { +func (m *ItemPropertiesSchemaRequestBuilder) Patch(ctx context.Context, body ItemPropertiesSchemaPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -79,14 +79,14 @@ func (m *ItemPropertiesSchemaRequestBuilder) Patch(ctx context.Context, body Ite "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCustomPropertyFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } - val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, len(res)) + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, len(res)) for i, v := range res { if v != nil { - val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable) + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable) } } return val, nil diff --git a/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go b/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go index 7159b94d..615a0112 100644 --- a/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go +++ b/pkg/github/orgs/item_properties_schema_with_custom_property_name_item_request_builder.go @@ -45,13 +45,13 @@ func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Delete( return nil } // Get gets a custom property that is defined for an organization.Organization members can read these properties. -// returns a OrgCustomPropertyable when successful +// returns a CustomPropertyable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/orgs/custom-properties#get-a-custom-property-for-an-organization -func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, error) { +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -60,23 +60,23 @@ func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Get(ctx "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCustomPropertyFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable), nil + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable), nil } // Put creates a new or updates an existing custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. -// returns a OrgCustomPropertyable when successful +// returns a CustomPropertyable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization -func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable, error) { +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -85,14 +85,14 @@ func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateOrgCustomPropertyFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCustomPropertyFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgCustomPropertyable), nil + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CustomPropertyable), nil } // ToDeleteRequestInformation removes a custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. // returns a *RequestInformation when successful diff --git a/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go b/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go index 4056b107..e604ca1c 100644 --- a/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go +++ b/pkg/github/orgs/item_rulesets_with_ruleset_item_request_builder.go @@ -44,7 +44,7 @@ func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) Delete(ctx context.Context, } return nil } -// Get get a repository ruleset for an organization. +// Get get a repository ruleset for an organization.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. // returns a RepositoryRulesetable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 500 status code @@ -102,7 +102,7 @@ func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) ToDeleteRequestInformation( requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get a repository ruleset for an organization. +// ToGetRequestInformation get a repository ruleset for an organization.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. // returns a *RequestInformation when successful func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_team_item_copilot_request_builder.go b/pkg/github/orgs/item_team_item_copilot_request_builder.go new file mode 100644 index 00000000..184e910c --- /dev/null +++ b/pkg/github/orgs/item_team_item_copilot_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamItemCopilotRequestBuilder builds and executes requests for operations under \orgs\{org}\team\{team_slug}\copilot +type ItemTeamItemCopilotRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamItemCopilotRequestBuilderInternal instantiates a new ItemTeamItemCopilotRequestBuilder and sets the default values. +func NewItemTeamItemCopilotRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotRequestBuilder) { + m := &ItemTeamItemCopilotRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot", pathParameters), + } + return m +} +// NewItemTeamItemCopilotRequestBuilder instantiates a new ItemTeamItemCopilotRequestBuilder and sets the default values. +func NewItemTeamItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemTeamItemCopilotUsageRequestBuilder when successful +func (m *ItemTeamItemCopilotRequestBuilder) Usage()(*ItemTeamItemCopilotUsageRequestBuilder) { + return NewItemTeamItemCopilotUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go b/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go new file mode 100644 index 00000000..4f92d05c --- /dev/null +++ b/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go @@ -0,0 +1,81 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemTeamItemCopilotUsageRequestBuilder builds and executes requests for operations under \orgs\{org}\team\{team_slug}\copilot\usage +type ItemTeamItemCopilotUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +type ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` + // Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. + Since *string `uriparametername:"since"` + // Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. + Until *string `uriparametername:"until"` +} +// NewItemTeamItemCopilotUsageRequestBuilderInternal instantiates a new ItemTeamItemCopilotUsageRequestBuilder and sets the default values. +func NewItemTeamItemCopilotUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotUsageRequestBuilder) { + m := &ItemTeamItemCopilotUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot/usage{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemTeamItemCopilotUsageRequestBuilder instantiates a new ItemTeamItemCopilotUsageRequestBuilder and sets the default values. +func NewItemTeamItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a []CopilotUsageMetricsable when successful +// returns a BasicError error when the service returns a 401 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team +func (m *ItemTeamItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "401": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsable) + } + } + return val, nil +} +// ToGetRequestInformation > [!NOTE]> This endpoint is in beta and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + 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 *ItemTeamItemCopilotUsageRequestBuilder when successful +func (m *ItemTeamItemCopilotUsageRequestBuilder) WithUrl(rawUrl string)(*ItemTeamItemCopilotUsageRequestBuilder) { + return NewItemTeamItemCopilotUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_team_request_builder.go b/pkg/github/orgs/item_team_request_builder.go new file mode 100644 index 00000000..abe992b6 --- /dev/null +++ b/pkg/github/orgs/item_team_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamRequestBuilder builds and executes requests for operations under \orgs\{org}\team +type ItemTeamRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByTeam_slug gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.team.item collection +// returns a *ItemTeamWithTeam_slugItemRequestBuilder when successful +func (m *ItemTeamRequestBuilder) ByTeam_slug(team_slug string)(*ItemTeamWithTeam_slugItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if team_slug != "" { + urlTplParams["team_slug"] = team_slug + } + return NewItemTeamWithTeam_slugItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamRequestBuilderInternal instantiates a new ItemTeamRequestBuilder and sets the default values. +func NewItemTeamRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamRequestBuilder) { + m := &ItemTeamRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team", pathParameters), + } + return m +} +// NewItemTeamRequestBuilder instantiates a new ItemTeamRequestBuilder and sets the default values. +func NewItemTeamRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_team_with_team_slug_item_request_builder.go b/pkg/github/orgs/item_team_with_team_slug_item_request_builder.go new file mode 100644 index 00000000..744397dd --- /dev/null +++ b/pkg/github/orgs/item_team_with_team_slug_item_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemTeamWithTeam_slugItemRequestBuilder builds and executes requests for operations under \orgs\{org}\team\{team_slug} +type ItemTeamWithTeam_slugItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemTeamWithTeam_slugItemRequestBuilderInternal instantiates a new ItemTeamWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamWithTeam_slugItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamWithTeam_slugItemRequestBuilder) { + m := &ItemTeamWithTeam_slugItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}", pathParameters), + } + return m +} +// NewItemTeamWithTeam_slugItemRequestBuilder instantiates a new ItemTeamWithTeam_slugItemRequestBuilder and sets the default values. +func NewItemTeamWithTeam_slugItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamWithTeam_slugItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamWithTeam_slugItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Copilot the copilot property +// returns a *ItemTeamItemCopilotRequestBuilder when successful +func (m *ItemTeamWithTeam_slugItemRequestBuilder) Copilot()(*ItemTeamItemCopilotRequestBuilder) { + return NewItemTeamItemCopilotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index 1a2fdf3d..bdcdd406 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -276,6 +276,11 @@ func (m *WithOrgItemRequestBuilder) SecurityManagers()(*ItemSecurityManagersRequ func (m *WithOrgItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Team the team property +// returns a *ItemTeamRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Team()(*ItemTeamRequestBuilder) { + return NewItemTeamRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Teams the teams property // returns a *ItemTeamsRequestBuilder when successful func (m *WithOrgItemRequestBuilder) Teams()(*ItemTeamsRequestBuilder) { diff --git a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go index 95b5c343..43b3c8e6 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go @@ -2,7 +2,7 @@ package item import ( "errors" ) -// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +// Required when using `merge_commit_message`.The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type RepoPatchRequestBody_merge_commit_title int const ( diff --git a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go index 6108d856..09822c44 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go @@ -2,7 +2,7 @@ package item import ( "errors" ) -// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +// Required when using `squash_merge_commit_message`.The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type RepoPatchRequestBody_squash_merge_commit_title int const ( diff --git a/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go index 3acd392c..289b5d73 100644 --- a/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go +++ b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemRulesetsWithRuleset_ItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters get a ruleset for a repository. +// ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. type ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters struct { // Include rulesets configured at higher levels that apply to this repository Includes_parents *bool `uriparametername:"includes_parents"` @@ -49,7 +49,7 @@ func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Delete(ctx context.Cont } return nil } -// Get get a ruleset for a repository. +// Get get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. // returns a RepositoryRulesetable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 500 status code @@ -107,7 +107,7 @@ func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToDeleteRequestInformat requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get a ruleset for a repository. +// ToGetRequestInformation get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. // returns a *RequestInformation when successful func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsWithRuleset_ItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_post_request_body.go b/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_post_request_body.go new file mode 100644 index 00000000..90a91ac5 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_post_request_body.go @@ -0,0 +1,111 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemItemSecretScanningPushProtectionBypassesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The ID of the push protection bypass placeholder. This value is returned on any push protected routes. + placeholder_id *string + // The reason for bypassing push protection. + reason *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason +} +// NewItemItemSecretScanningPushProtectionBypassesPostRequestBody instantiates a new ItemItemSecretScanningPushProtectionBypassesPostRequestBody and sets the default values. +func NewItemItemSecretScanningPushProtectionBypassesPostRequestBody()(*ItemItemSecretScanningPushProtectionBypassesPostRequestBody) { + m := &ItemItemSecretScanningPushProtectionBypassesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemSecretScanningPushProtectionBypassesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemSecretScanningPushProtectionBypassesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemSecretScanningPushProtectionBypassesPostRequestBody(), 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 *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["placeholder_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlaceholderId(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ParseSecretScanningPushProtectionBypassReason) + if err != nil { + return err + } + if val != nil { + m.SetReason(val.(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason)) + } + return nil + } + return res +} +// GetPlaceholderId gets the placeholder_id property value. The ID of the push protection bypass placeholder. This value is returned on any push protected routes. +// returns a *string when successful +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) GetPlaceholderId()(*string) { + return m.placeholder_id +} +// GetReason gets the reason property value. The reason for bypassing push protection. +// returns a *SecretScanningPushProtectionBypassReason when successful +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) GetReason()(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason) { + return m.reason +} +// Serialize serializes information the current object +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("placeholder_id", m.GetPlaceholderId()) + if err != nil { + return err + } + } + if m.GetReason() != nil { + cast := (*m.GetReason()).String() + err := writer.WriteStringValue("reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPlaceholderId sets the placeholder_id property value. The ID of the push protection bypass placeholder. This value is returned on any push protected routes. +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) SetPlaceholderId(value *string)() { + m.placeholder_id = value +} +// SetReason sets the reason property value. The reason for bypassing push protection. +func (m *ItemItemSecretScanningPushProtectionBypassesPostRequestBody) SetReason(value *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason)() { + m.reason = value +} +type ItemItemSecretScanningPushProtectionBypassesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlaceholderId()(*string) + GetReason()(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason) + SetPlaceholderId(value *string)() + SetReason(value *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassReason)() +} diff --git a/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_request_builder.go b/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_request_builder.go new file mode 100644 index 00000000..938fe6a2 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_push_protection_bypasses_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemSecretScanningPushProtectionBypassesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\push-protection-bypasses +type ItemItemSecretScanningPushProtectionBypassesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecretScanningPushProtectionBypassesRequestBuilderInternal instantiates a new ItemItemSecretScanningPushProtectionBypassesRequestBuilder and sets the default values. +func NewItemItemSecretScanningPushProtectionBypassesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningPushProtectionBypassesRequestBuilder) { + m := &ItemItemSecretScanningPushProtectionBypassesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/push-protection-bypasses", pathParameters), + } + return m +} +// NewItemItemSecretScanningPushProtectionBypassesRequestBuilder instantiates a new ItemItemSecretScanningPushProtectionBypassesRequestBuilder and sets the default values. +func NewItemItemSecretScanningPushProtectionBypassesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningPushProtectionBypassesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningPushProtectionBypassesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a bypass for a previously push protected secret.The authenticated user must be the original author of the committed secret.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a SecretScanningPushProtectionBypassable when successful +// returns a SecretScanningPushProtectionBypass503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/secret-scanning/secret-scanning#create-a-push-protection-bypass +func (m *ItemItemSecretScanningPushProtectionBypassesRequestBuilder) Post(ctx context.Context, body ItemItemSecretScanningPushProtectionBypassesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSecretScanningPushProtectionBypass503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSecretScanningPushProtectionBypassFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningPushProtectionBypassable), nil +} +// ToPostRequestInformation creates a bypass for a previously push protected secret.The authenticated user must be the original author of the committed secret.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningPushProtectionBypassesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemSecretScanningPushProtectionBypassesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecretScanningPushProtectionBypassesRequestBuilder when successful +func (m *ItemItemSecretScanningPushProtectionBypassesRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecretScanningPushProtectionBypassesRequestBuilder) { + return NewItemItemSecretScanningPushProtectionBypassesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_secret_scanning_request_builder.go b/pkg/github/repos/item_item_secret_scanning_request_builder.go index 6231e771..bbb693f7 100644 --- a/pkg/github/repos/item_item_secret_scanning_request_builder.go +++ b/pkg/github/repos/item_item_secret_scanning_request_builder.go @@ -26,3 +26,8 @@ func NewItemItemSecretScanningRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemItemSecretScanningRequestBuilderInternal(urlParams, requestAdapter) } +// PushProtectionBypasses the pushProtectionBypasses property +// returns a *ItemItemSecretScanningPushProtectionBypassesRequestBuilder when successful +func (m *ItemItemSecretScanningRequestBuilder) PushProtectionBypasses()(*ItemItemSecretScanningPushProtectionBypassesRequestBuilder) { + return NewItemItemSecretScanningPushProtectionBypassesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go index dd1e4b9d..99b49810 100644 --- a/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go +++ b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go @@ -2,7 +2,7 @@ package repos import ( "errors" ) -// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). +// Required when using `merge_commit_message`.The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type ReposPostRequestBody_merge_commit_title int const ( diff --git a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go index 51ceb4f6..1b55a81e 100644 --- a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go +++ b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go @@ -2,7 +2,7 @@ package repos import ( "errors" ) -// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +// Required when using `squash_merge_commit_message`.The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type ReposPostRequestBody_squash_merge_commit_title int const (