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..a53e9073 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "69B161AEBDE87E127DB15C26F687951F2C4EC154754CC81FAEE2C1258265EA737FE15B6459B3F721B15D2F078A075486011134B82AE8CDB0828C485EE1CE03E8", + "descriptionHash": "F7F8248C45DF0A091DD3753E2D37F67A791440C92D2259591AFC4F36EB455930AEE0C5C47F96144EF275A8478E90C821EEAC411467FD25867A4AC2E992A0DD64", "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/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/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/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_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_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/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/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 (