From 89e3e567000f8d29717242df15fd532c62c8d2ff Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 30 Oct 2024 10:44:48 -0700 Subject: [PATCH] feat: Changes in generated code * New updates to generated code * New updates to generated code --- .../item_copilot_metrics_request_builder.go | 81 + .../item_copilot_request_builder.go | 5 + ...am_item_copilot_metrics_request_builder.go | 81 + .../item_team_item_copilot_request_builder.go | 5 + pkg/github/kiota-lock.json | 2 +- pkg/github/models/copilot_dotcom_chat.go | 122 + .../copilot_dotcom_chat_escaped_models.go | 196 ++ .../models/copilot_dotcom_pull_requests.go | 122 + ...tcom_pull_requests_escaped_repositories.go | 150 + ...sts_escaped_repositories_escaped_models.go | 196 ++ pkg/github/models/copilot_ide_chat.go | 122 + .../copilot_ide_chat_escaped_editors.go | 151 + ...ide_chat_escaped_editors_escaped_models.go | 254 ++ .../models/copilot_ide_code_completions.go | 163 ++ ...ot_ide_code_completions_escaped_editors.go | 151 + ...pletions_escaped_editors_escaped_models.go | 208 ++ ...ditors_escaped_models_escaped_languages.go | 226 ++ ..._ide_code_completions_escaped_languages.go | 110 + .../models/copilot_usage_metrics_day.go | 255 ++ .../models/pull_request_escaped_base.go | 44 +- .../pull_request_escaped_base_escaped_repo.go | 2523 ----------------- ...escaped_base_escaped_repo_escaped_owner.go | 602 ---- ...d_base_escaped_repo_escaped_permissions.go | 196 -- .../pull_request_escaped_base_escaped_user.go | 602 ---- .../models/pull_request_escaped_head.go | 44 +- .../pull_request_escaped_head_escaped_repo.go | 2523 ----------------- ...caped_head_escaped_repo_escaped_license.go | 196 -- ...escaped_head_escaped_repo_escaped_owner.go | 602 ---- ...d_head_escaped_repo_escaped_permissions.go | 196 -- .../pull_request_escaped_head_escaped_user.go | 602 ---- .../attach_post_request_body_escaped_scope.go | 5 +- .../item_copilot_metrics_request_builder.go | 81 + .../orgs/item_copilot_request_builder.go | 5 + ...am_item_copilot_metrics_request_builder.go | 81 + .../item_team_item_copilot_request_builder.go | 5 + pkg/github/user/orgs_request_builder.go | 6 +- .../users/item_events_request_builder.go | 6 +- 37 files changed, 2825 insertions(+), 8094 deletions(-) create mode 100644 pkg/github/enterprises/item_copilot_metrics_request_builder.go create mode 100644 pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go create mode 100644 pkg/github/models/copilot_dotcom_chat.go create mode 100644 pkg/github/models/copilot_dotcom_chat_escaped_models.go create mode 100644 pkg/github/models/copilot_dotcom_pull_requests.go create mode 100644 pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories.go create mode 100644 pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go create mode 100644 pkg/github/models/copilot_ide_chat.go create mode 100644 pkg/github/models/copilot_ide_chat_escaped_editors.go create mode 100644 pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go create mode 100644 pkg/github/models/copilot_ide_code_completions.go create mode 100644 pkg/github/models/copilot_ide_code_completions_escaped_editors.go create mode 100644 pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go create mode 100644 pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models_escaped_languages.go create mode 100644 pkg/github/models/copilot_ide_code_completions_escaped_languages.go create mode 100644 pkg/github/models/copilot_usage_metrics_day.go delete mode 100644 pkg/github/models/pull_request_escaped_base_escaped_repo.go delete mode 100644 pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_owner.go delete mode 100644 pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_permissions.go delete mode 100644 pkg/github/models/pull_request_escaped_base_escaped_user.go delete mode 100644 pkg/github/models/pull_request_escaped_head_escaped_repo.go delete mode 100644 pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_license.go delete mode 100644 pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_owner.go delete mode 100644 pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_permissions.go delete mode 100644 pkg/github/models/pull_request_escaped_head_escaped_user.go create mode 100644 pkg/github/orgs/item_copilot_metrics_request_builder.go create mode 100644 pkg/github/orgs/item_team_item_copilot_metrics_request_builder.go diff --git a/pkg/github/enterprises/item_copilot_metrics_request_builder.go b/pkg/github/enterprises/item_copilot_metrics_request_builder.go new file mode 100644 index 00000000..eb33a9da --- /dev/null +++ b/pkg/github/enterprises/item_copilot_metrics_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" +) + +// ItemCopilotMetricsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\copilot\metrics +type ItemCopilotMetricsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotMetricsRequestBuilderGetQueryParameters use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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 ItemCopilotMetricsRequestBuilderGetQueryParameters 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"` +} +// NewItemCopilotMetricsRequestBuilderInternal instantiates a new ItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemCopilotMetricsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotMetricsRequestBuilder) { + m := &ItemCopilotMetricsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemCopilotMetricsRequestBuilder instantiates a new ItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemCopilotMetricsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotMetricsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotMetricsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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 []CopilotUsageMetricsDayable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 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-metrics#get-copilot-metrics-for-an-enterprise +func (m *ItemCopilotMetricsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotMetricsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsDayFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable) + } + } + return val, nil +} +// ToGetRequestInformation use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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 *ItemCopilotMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotMetricsRequestBuilderGetQueryParameters])(*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 *ItemCopilotMetricsRequestBuilder when successful +func (m *ItemCopilotMetricsRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotMetricsRequestBuilder) { + return NewItemCopilotMetricsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_copilot_request_builder.go b/pkg/github/enterprises/item_copilot_request_builder.go index 9a7c8b1e..70df26b6 100644 --- a/pkg/github/enterprises/item_copilot_request_builder.go +++ b/pkg/github/enterprises/item_copilot_request_builder.go @@ -26,6 +26,11 @@ func NewItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26 urlParams["request-raw-url"] = rawUrl return NewItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } +// Metrics the metrics property +// returns a *ItemCopilotMetricsRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Metrics()(*ItemCopilotMetricsRequestBuilder) { + return NewItemCopilotMetricsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Usage the usage property // returns a *ItemCopilotUsageRequestBuilder when successful func (m *ItemCopilotRequestBuilder) Usage()(*ItemCopilotUsageRequestBuilder) { diff --git a/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go new file mode 100644 index 00000000..2456168b --- /dev/null +++ b/pkg/github/enterprises/item_team_item_copilot_metrics_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" +) + +// ItemTeamItemCopilotMetricsRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\team\{team_slug}\copilot\metrics +type ItemTeamItemCopilotMetricsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot 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 ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters 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"` +} +// NewItemTeamItemCopilotMetricsRequestBuilderInternal instantiates a new ItemTeamItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemTeamItemCopilotMetricsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotMetricsRequestBuilder) { + m := &ItemTeamItemCopilotMetricsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/team/{team_slug}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemTeamItemCopilotMetricsRequestBuilder instantiates a new ItemTeamItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemTeamItemCopilotMetricsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotMetricsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotMetricsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot 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 []CopilotUsageMetricsDayable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 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-metrics#get-copilot-metrics-for-an-enterprise-team +func (m *ItemTeamItemCopilotMetricsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsDayFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable) + } + } + return val, nil +} +// ToGetRequestInformation use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. 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** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot 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 *ItemTeamItemCopilotMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters])(*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 *ItemTeamItemCopilotMetricsRequestBuilder when successful +func (m *ItemTeamItemCopilotMetricsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamItemCopilotMetricsRequestBuilder) { + return NewItemTeamItemCopilotMetricsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/enterprises/item_team_item_copilot_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_request_builder.go index e1f3b524..e726cd74 100644 --- a/pkg/github/enterprises/item_team_item_copilot_request_builder.go +++ b/pkg/github/enterprises/item_team_item_copilot_request_builder.go @@ -21,6 +21,11 @@ func NewItemTeamItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187 urlParams["request-raw-url"] = rawUrl return NewItemTeamItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } +// Metrics the metrics property +// returns a *ItemTeamItemCopilotMetricsRequestBuilder when successful +func (m *ItemTeamItemCopilotRequestBuilder) Metrics()(*ItemTeamItemCopilotMetricsRequestBuilder) { + return NewItemTeamItemCopilotMetricsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Usage the usage property // returns a *ItemTeamItemCopilotUsageRequestBuilder when successful func (m *ItemTeamItemCopilotRequestBuilder) Usage()(*ItemTeamItemCopilotUsageRequestBuilder) { diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 10676527..52bad2e8 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "93BEAB2B4615A191CA86B79FF0A3FC794655717BEF6D602BDA0DFD8E3CE1011751A1112EB5F673E268C12658D3CF9658EF2CFE1BD861435D6770F9168D20811C", + "descriptionHash": "5459CA11128EA114CCBEE2FB305F8DE4EC02841EAE36035698735C0ABC3D252974132381FCA3063DA1998CA649237F6AF7ACBB41682494126FFF13B4F5A284B7", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_dotcom_chat.go b/pkg/github/models/copilot_dotcom_chat.go new file mode 100644 index 00000000..5c81fe47 --- /dev/null +++ b/pkg/github/models/copilot_dotcom_chat.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotDotcomChat usage metrics for Copilot Chat in github.com +type CopilotDotcomChat struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of model metrics for a custom models and the default model. + models []CopilotDotcomChat_modelsable + // Total number of users who prompted Copilot Chat on github.com at least once. + total_engaged_users *int32 +} +// NewCopilotDotcomChat instantiates a new CopilotDotcomChat and sets the default values. +func NewCopilotDotcomChat()(*CopilotDotcomChat) { + m := &CopilotDotcomChat{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotDotcomChatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotDotcomChatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotDotcomChat(), 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 *CopilotDotcomChat) 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 *CopilotDotcomChat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["models"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotDotcomChat_modelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotDotcomChat_modelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotDotcomChat_modelsable) + } + } + m.SetModels(res) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetModels gets the models property value. List of model metrics for a custom models and the default model. +// returns a []CopilotDotcomChat_modelsable when successful +func (m *CopilotDotcomChat) GetModels()([]CopilotDotcomChat_modelsable) { + return m.models +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Total number of users who prompted Copilot Chat on github.com at least once. +// returns a *int32 when successful +func (m *CopilotDotcomChat) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotDotcomChat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetModels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModels())) + for i, v := range m.GetModels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("models", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotDotcomChat) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetModels sets the models property value. List of model metrics for a custom models and the default model. +func (m *CopilotDotcomChat) SetModels(value []CopilotDotcomChat_modelsable)() { + m.models = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Total number of users who prompted Copilot Chat on github.com at least once. +func (m *CopilotDotcomChat) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotDotcomChatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetModels()([]CopilotDotcomChat_modelsable) + GetTotalEngagedUsers()(*int32) + SetModels(value []CopilotDotcomChat_modelsable)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_dotcom_chat_escaped_models.go b/pkg/github/models/copilot_dotcom_chat_escaped_models.go new file mode 100644 index 00000000..1d434464 --- /dev/null +++ b/pkg/github/models/copilot_dotcom_chat_escaped_models.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CopilotDotcomChat_models 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 training date for the custom model (if applicable). + custom_model_training_date *string + // Indicates whether a model is custom or default. + is_custom_model *bool + // Name of the language used for Copilot code completion suggestions, for the given editor. + name *string + // Total number of chats initiated by users on github.com. + total_chats *int32 + // Total number of users who prompted Copilot Chat on github.com at least once for each model. + total_engaged_users *int32 +} +// NewCopilotDotcomChat_models instantiates a new CopilotDotcomChat_models and sets the default values. +func NewCopilotDotcomChat_models()(*CopilotDotcomChat_models) { + m := &CopilotDotcomChat_models{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotDotcomChat_modelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotDotcomChat_modelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotDotcomChat_models(), 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 *CopilotDotcomChat_models) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomModelTrainingDate gets the custom_model_training_date property value. The training date for the custom model (if applicable). +// returns a *string when successful +func (m *CopilotDotcomChat_models) GetCustomModelTrainingDate()(*string) { + return m.custom_model_training_date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotDotcomChat_models) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_model_training_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomModelTrainingDate(val) + } + return nil + } + res["is_custom_model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomModel(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["total_chats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChats(val) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetIsCustomModel gets the is_custom_model property value. Indicates whether a model is custom or default. +// returns a *bool when successful +func (m *CopilotDotcomChat_models) GetIsCustomModel()(*bool) { + return m.is_custom_model +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// returns a *string when successful +func (m *CopilotDotcomChat_models) GetName()(*string) { + return m.name +} +// GetTotalChats gets the total_chats property value. Total number of chats initiated by users on github.com. +// returns a *int32 when successful +func (m *CopilotDotcomChat_models) GetTotalChats()(*int32) { + return m.total_chats +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Total number of users who prompted Copilot Chat on github.com at least once for each model. +// returns a *int32 when successful +func (m *CopilotDotcomChat_models) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotDotcomChat_models) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("custom_model_training_date", m.GetCustomModelTrainingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_custom_model", m.GetIsCustomModel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chats", m.GetTotalChats()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotDotcomChat_models) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomModelTrainingDate sets the custom_model_training_date property value. The training date for the custom model (if applicable). +func (m *CopilotDotcomChat_models) SetCustomModelTrainingDate(value *string)() { + m.custom_model_training_date = value +} +// SetIsCustomModel sets the is_custom_model property value. Indicates whether a model is custom or default. +func (m *CopilotDotcomChat_models) SetIsCustomModel(value *bool)() { + m.is_custom_model = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +func (m *CopilotDotcomChat_models) SetName(value *string)() { + m.name = value +} +// SetTotalChats sets the total_chats property value. Total number of chats initiated by users on github.com. +func (m *CopilotDotcomChat_models) SetTotalChats(value *int32)() { + m.total_chats = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Total number of users who prompted Copilot Chat on github.com at least once for each model. +func (m *CopilotDotcomChat_models) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotDotcomChat_modelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomModelTrainingDate()(*string) + GetIsCustomModel()(*bool) + GetName()(*string) + GetTotalChats()(*int32) + GetTotalEngagedUsers()(*int32) + SetCustomModelTrainingDate(value *string)() + SetIsCustomModel(value *bool)() + SetName(value *string)() + SetTotalChats(value *int32)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_dotcom_pull_requests.go b/pkg/github/models/copilot_dotcom_pull_requests.go new file mode 100644 index 00000000..134a0ef5 --- /dev/null +++ b/pkg/github/models/copilot_dotcom_pull_requests.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotDotcomPullRequests usage metrics for Copilot for pull requests. +type CopilotDotcomPullRequests struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Repositories in which users used Copilot for Pull Requests to generate pull request summaries + repositories []CopilotDotcomPullRequests_repositoriesable + // The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. + total_engaged_users *int32 +} +// NewCopilotDotcomPullRequests instantiates a new CopilotDotcomPullRequests and sets the default values. +func NewCopilotDotcomPullRequests()(*CopilotDotcomPullRequests) { + m := &CopilotDotcomPullRequests{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotDotcomPullRequestsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotDotcomPullRequestsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotDotcomPullRequests(), 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 *CopilotDotcomPullRequests) 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 *CopilotDotcomPullRequests) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotDotcomPullRequests_repositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotDotcomPullRequests_repositoriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotDotcomPullRequests_repositoriesable) + } + } + m.SetRepositories(res) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. Repositories in which users used Copilot for Pull Requests to generate pull request summaries +// returns a []CopilotDotcomPullRequests_repositoriesable when successful +func (m *CopilotDotcomPullRequests) GetRepositories()([]CopilotDotcomPullRequests_repositoriesable) { + return m.repositories +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. +// returns a *int32 when successful +func (m *CopilotDotcomPullRequests) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotDotcomPullRequests) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotDotcomPullRequests) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. Repositories in which users used Copilot for Pull Requests to generate pull request summaries +func (m *CopilotDotcomPullRequests) SetRepositories(value []CopilotDotcomPullRequests_repositoriesable)() { + m.repositories = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. +func (m *CopilotDotcomPullRequests) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotDotcomPullRequestsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]CopilotDotcomPullRequests_repositoriesable) + GetTotalEngagedUsers()(*int32) + SetRepositories(value []CopilotDotcomPullRequests_repositoriesable)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories.go b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories.go new file mode 100644 index 00000000..458aa09f --- /dev/null +++ b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CopilotDotcomPullRequests_repositories struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of model metrics for custom models and the default model. + models []CopilotDotcomPullRequests_repositories_modelsable + // Repository name + name *string + // The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. + total_engaged_users *int32 +} +// NewCopilotDotcomPullRequests_repositories instantiates a new CopilotDotcomPullRequests_repositories and sets the default values. +func NewCopilotDotcomPullRequests_repositories()(*CopilotDotcomPullRequests_repositories) { + m := &CopilotDotcomPullRequests_repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotDotcomPullRequests_repositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotDotcomPullRequests_repositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotDotcomPullRequests_repositories(), 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 *CopilotDotcomPullRequests_repositories) 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 *CopilotDotcomPullRequests_repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["models"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotDotcomPullRequests_repositories_modelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotDotcomPullRequests_repositories_modelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotDotcomPullRequests_repositories_modelsable) + } + } + m.SetModels(res) + } + 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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetModels gets the models property value. List of model metrics for custom models and the default model. +// returns a []CopilotDotcomPullRequests_repositories_modelsable when successful +func (m *CopilotDotcomPullRequests_repositories) GetModels()([]CopilotDotcomPullRequests_repositories_modelsable) { + return m.models +} +// GetName gets the name property value. Repository name +// returns a *string when successful +func (m *CopilotDotcomPullRequests_repositories) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. +// returns a *int32 when successful +func (m *CopilotDotcomPullRequests_repositories) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotDotcomPullRequests_repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetModels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModels())) + for i, v := range m.GetModels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("models", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotDotcomPullRequests_repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetModels sets the models property value. List of model metrics for custom models and the default model. +func (m *CopilotDotcomPullRequests_repositories) SetModels(value []CopilotDotcomPullRequests_repositories_modelsable)() { + m.models = value +} +// SetName sets the name property value. Repository name +func (m *CopilotDotcomPullRequests_repositories) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. +func (m *CopilotDotcomPullRequests_repositories) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotDotcomPullRequests_repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetModels()([]CopilotDotcomPullRequests_repositories_modelsable) + GetName()(*string) + GetTotalEngagedUsers()(*int32) + SetModels(value []CopilotDotcomPullRequests_repositories_modelsable)() + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go new file mode 100644 index 00000000..87551878 --- /dev/null +++ b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CopilotDotcomPullRequests_repositories_models 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 training date for the custom model. + custom_model_training_date *string + // Indicates whether a model is custom or default. + is_custom_model *bool + // Name of the language used for Copilot code completion suggestions, for the given editor. + name *string + // The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. + total_engaged_users *int32 + // The number of pull request summaries generated using Copilot for Pull Requests in the given repository. + total_pr_summaries_created *int32 +} +// NewCopilotDotcomPullRequests_repositories_models instantiates a new CopilotDotcomPullRequests_repositories_models and sets the default values. +func NewCopilotDotcomPullRequests_repositories_models()(*CopilotDotcomPullRequests_repositories_models) { + m := &CopilotDotcomPullRequests_repositories_models{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotDotcomPullRequests_repositories_modelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotDotcomPullRequests_repositories_modelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotDotcomPullRequests_repositories_models(), 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 *CopilotDotcomPullRequests_repositories_models) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomModelTrainingDate gets the custom_model_training_date property value. The training date for the custom model. +// returns a *string when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetCustomModelTrainingDate()(*string) { + return m.custom_model_training_date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_model_training_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomModelTrainingDate(val) + } + return nil + } + res["is_custom_model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomModel(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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + res["total_pr_summaries_created"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalPrSummariesCreated(val) + } + return nil + } + return res +} +// GetIsCustomModel gets the is_custom_model property value. Indicates whether a model is custom or default. +// returns a *bool when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetIsCustomModel()(*bool) { + return m.is_custom_model +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// returns a *string when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. +// returns a *int32 when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// GetTotalPrSummariesCreated gets the total_pr_summaries_created property value. The number of pull request summaries generated using Copilot for Pull Requests in the given repository. +// returns a *int32 when successful +func (m *CopilotDotcomPullRequests_repositories_models) GetTotalPrSummariesCreated()(*int32) { + return m.total_pr_summaries_created +} +// Serialize serializes information the current object +func (m *CopilotDotcomPullRequests_repositories_models) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("custom_model_training_date", m.GetCustomModelTrainingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_custom_model", m.GetIsCustomModel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_pr_summaries_created", m.GetTotalPrSummariesCreated()) + 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 *CopilotDotcomPullRequests_repositories_models) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomModelTrainingDate sets the custom_model_training_date property value. The training date for the custom model. +func (m *CopilotDotcomPullRequests_repositories_models) SetCustomModelTrainingDate(value *string)() { + m.custom_model_training_date = value +} +// SetIsCustomModel sets the is_custom_model property value. Indicates whether a model is custom or default. +func (m *CopilotDotcomPullRequests_repositories_models) SetIsCustomModel(value *bool)() { + m.is_custom_model = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +func (m *CopilotDotcomPullRequests_repositories_models) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. +func (m *CopilotDotcomPullRequests_repositories_models) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +// SetTotalPrSummariesCreated sets the total_pr_summaries_created property value. The number of pull request summaries generated using Copilot for Pull Requests in the given repository. +func (m *CopilotDotcomPullRequests_repositories_models) SetTotalPrSummariesCreated(value *int32)() { + m.total_pr_summaries_created = value +} +type CopilotDotcomPullRequests_repositories_modelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomModelTrainingDate()(*string) + GetIsCustomModel()(*bool) + GetName()(*string) + GetTotalEngagedUsers()(*int32) + GetTotalPrSummariesCreated()(*int32) + SetCustomModelTrainingDate(value *string)() + SetIsCustomModel(value *bool)() + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() + SetTotalPrSummariesCreated(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_chat.go b/pkg/github/models/copilot_ide_chat.go new file mode 100644 index 00000000..80df5186 --- /dev/null +++ b/pkg/github/models/copilot_ide_chat.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeChat usage metrics for Copilot Chat in the IDE. +type CopilotIdeChat 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 editors property + editors []CopilotIdeChat_editorsable + // Total number of users who prompted Copilot Chat in the IDE. + total_engaged_users *int32 +} +// NewCopilotIdeChat instantiates a new CopilotIdeChat and sets the default values. +func NewCopilotIdeChat()(*CopilotIdeChat) { + m := &CopilotIdeChat{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeChatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeChatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeChat(), 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 *CopilotIdeChat) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEditors gets the editors property value. The editors property +// returns a []CopilotIdeChat_editorsable when successful +func (m *CopilotIdeChat) GetEditors()([]CopilotIdeChat_editorsable) { + return m.editors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotIdeChat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["editors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeChat_editorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeChat_editorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeChat_editorsable) + } + } + m.SetEditors(res) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Total number of users who prompted Copilot Chat in the IDE. +// returns a *int32 when successful +func (m *CopilotIdeChat) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeChat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEditors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEditors())) + for i, v := range m.GetEditors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("editors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeChat) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEditors sets the editors property value. The editors property +func (m *CopilotIdeChat) SetEditors(value []CopilotIdeChat_editorsable)() { + m.editors = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Total number of users who prompted Copilot Chat in the IDE. +func (m *CopilotIdeChat) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeChatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEditors()([]CopilotIdeChat_editorsable) + GetTotalEngagedUsers()(*int32) + SetEditors(value []CopilotIdeChat_editorsable)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_chat_escaped_editors.go b/pkg/github/models/copilot_ide_chat_escaped_editors.go new file mode 100644 index 00000000..ba295baf --- /dev/null +++ b/pkg/github/models/copilot_ide_chat_escaped_editors.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeChat_editors copilot Chat metrics, for active editors. +type CopilotIdeChat_editors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of model metrics for custom models and the default model. + models []CopilotIdeChat_editors_modelsable + // Name of the given editor. + name *string + // The number of users who prompted Copilot Chat in the specified editor. + total_engaged_users *int32 +} +// NewCopilotIdeChat_editors instantiates a new CopilotIdeChat_editors and sets the default values. +func NewCopilotIdeChat_editors()(*CopilotIdeChat_editors) { + m := &CopilotIdeChat_editors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeChat_editorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeChat_editorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeChat_editors(), 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 *CopilotIdeChat_editors) 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 *CopilotIdeChat_editors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["models"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeChat_editors_modelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeChat_editors_modelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeChat_editors_modelsable) + } + } + m.SetModels(res) + } + 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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetModels gets the models property value. List of model metrics for custom models and the default model. +// returns a []CopilotIdeChat_editors_modelsable when successful +func (m *CopilotIdeChat_editors) GetModels()([]CopilotIdeChat_editors_modelsable) { + return m.models +} +// GetName gets the name property value. Name of the given editor. +// returns a *string when successful +func (m *CopilotIdeChat_editors) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The number of users who prompted Copilot Chat in the specified editor. +// returns a *int32 when successful +func (m *CopilotIdeChat_editors) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeChat_editors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetModels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModels())) + for i, v := range m.GetModels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("models", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeChat_editors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetModels sets the models property value. List of model metrics for custom models and the default model. +func (m *CopilotIdeChat_editors) SetModels(value []CopilotIdeChat_editors_modelsable)() { + m.models = value +} +// SetName sets the name property value. Name of the given editor. +func (m *CopilotIdeChat_editors) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The number of users who prompted Copilot Chat in the specified editor. +func (m *CopilotIdeChat_editors) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeChat_editorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetModels()([]CopilotIdeChat_editors_modelsable) + GetName()(*string) + GetTotalEngagedUsers()(*int32) + SetModels(value []CopilotIdeChat_editors_modelsable)() + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go new file mode 100644 index 00000000..41320171 --- /dev/null +++ b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CopilotIdeChat_editors_models 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 training date for the custom model. + custom_model_training_date *string + // Indicates whether a model is custom or default. + is_custom_model *bool + // Name of the language used for Copilot code completion suggestions, for the given editor. + name *string + // The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. + total_chat_copy_events *int32 + // The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. + total_chat_insertion_events *int32 + // The total number of chats initiated by users in the given editor and model. + total_chats *int32 + // The number of users who prompted Copilot Chat in the given editor and model. + total_engaged_users *int32 +} +// NewCopilotIdeChat_editors_models instantiates a new CopilotIdeChat_editors_models and sets the default values. +func NewCopilotIdeChat_editors_models()(*CopilotIdeChat_editors_models) { + m := &CopilotIdeChat_editors_models{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeChat_editors_modelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeChat_editors_modelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeChat_editors_models(), 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 *CopilotIdeChat_editors_models) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomModelTrainingDate gets the custom_model_training_date property value. The training date for the custom model. +// returns a *string when successful +func (m *CopilotIdeChat_editors_models) GetCustomModelTrainingDate()(*string) { + return m.custom_model_training_date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotIdeChat_editors_models) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_model_training_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomModelTrainingDate(val) + } + return nil + } + res["is_custom_model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomModel(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["total_chat_copy_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChatCopyEvents(val) + } + return nil + } + res["total_chat_insertion_events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChatInsertionEvents(val) + } + return nil + } + res["total_chats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalChats(val) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetIsCustomModel gets the is_custom_model property value. Indicates whether a model is custom or default. +// returns a *bool when successful +func (m *CopilotIdeChat_editors_models) GetIsCustomModel()(*bool) { + return m.is_custom_model +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// returns a *string when successful +func (m *CopilotIdeChat_editors_models) GetName()(*string) { + return m.name +} +// GetTotalChatCopyEvents gets the total_chat_copy_events property value. The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. +// returns a *int32 when successful +func (m *CopilotIdeChat_editors_models) GetTotalChatCopyEvents()(*int32) { + return m.total_chat_copy_events +} +// GetTotalChatInsertionEvents gets the total_chat_insertion_events property value. The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. +// returns a *int32 when successful +func (m *CopilotIdeChat_editors_models) GetTotalChatInsertionEvents()(*int32) { + return m.total_chat_insertion_events +} +// GetTotalChats gets the total_chats property value. The total number of chats initiated by users in the given editor and model. +// returns a *int32 when successful +func (m *CopilotIdeChat_editors_models) GetTotalChats()(*int32) { + return m.total_chats +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The number of users who prompted Copilot Chat in the given editor and model. +// returns a *int32 when successful +func (m *CopilotIdeChat_editors_models) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeChat_editors_models) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("custom_model_training_date", m.GetCustomModelTrainingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_custom_model", m.GetIsCustomModel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chats", m.GetTotalChats()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chat_copy_events", m.GetTotalChatCopyEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_chat_insertion_events", m.GetTotalChatInsertionEvents()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeChat_editors_models) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomModelTrainingDate sets the custom_model_training_date property value. The training date for the custom model. +func (m *CopilotIdeChat_editors_models) SetCustomModelTrainingDate(value *string)() { + m.custom_model_training_date = value +} +// SetIsCustomModel sets the is_custom_model property value. Indicates whether a model is custom or default. +func (m *CopilotIdeChat_editors_models) SetIsCustomModel(value *bool)() { + m.is_custom_model = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +func (m *CopilotIdeChat_editors_models) SetName(value *string)() { + m.name = value +} +// SetTotalChatCopyEvents sets the total_chat_copy_events property value. The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. +func (m *CopilotIdeChat_editors_models) SetTotalChatCopyEvents(value *int32)() { + m.total_chat_copy_events = value +} +// SetTotalChatInsertionEvents sets the total_chat_insertion_events property value. The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. +func (m *CopilotIdeChat_editors_models) SetTotalChatInsertionEvents(value *int32)() { + m.total_chat_insertion_events = value +} +// SetTotalChats sets the total_chats property value. The total number of chats initiated by users in the given editor and model. +func (m *CopilotIdeChat_editors_models) SetTotalChats(value *int32)() { + m.total_chats = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The number of users who prompted Copilot Chat in the given editor and model. +func (m *CopilotIdeChat_editors_models) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeChat_editors_modelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomModelTrainingDate()(*string) + GetIsCustomModel()(*bool) + GetName()(*string) + GetTotalChatCopyEvents()(*int32) + GetTotalChatInsertionEvents()(*int32) + GetTotalChats()(*int32) + GetTotalEngagedUsers()(*int32) + SetCustomModelTrainingDate(value *string)() + SetIsCustomModel(value *bool)() + SetName(value *string)() + SetTotalChatCopyEvents(value *int32)() + SetTotalChatInsertionEvents(value *int32)() + SetTotalChats(value *int32)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_code_completions.go b/pkg/github/models/copilot_ide_code_completions.go new file mode 100644 index 00000000..b9b94c49 --- /dev/null +++ b/pkg/github/models/copilot_ide_code_completions.go @@ -0,0 +1,163 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeCodeCompletions usage metrics for Copilot editor code completions in the IDE. +type CopilotIdeCodeCompletions 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 editors property + editors []CopilotIdeCodeCompletions_editorsable + // Code completion metrics for active languages. + languages []CopilotIdeCodeCompletions_languagesable + // Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. + total_engaged_users *int32 +} +// NewCopilotIdeCodeCompletions instantiates a new CopilotIdeCodeCompletions and sets the default values. +func NewCopilotIdeCodeCompletions()(*CopilotIdeCodeCompletions) { + m := &CopilotIdeCodeCompletions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeCodeCompletionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeCodeCompletionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeCodeCompletions(), 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 *CopilotIdeCodeCompletions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEditors gets the editors property value. The editors property +// returns a []CopilotIdeCodeCompletions_editorsable when successful +func (m *CopilotIdeCodeCompletions) GetEditors()([]CopilotIdeCodeCompletions_editorsable) { + return m.editors +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotIdeCodeCompletions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["editors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeCodeCompletions_editorsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeCodeCompletions_editorsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeCodeCompletions_editorsable) + } + } + m.SetEditors(res) + } + return nil + } + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeCodeCompletions_languagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeCodeCompletions_languagesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeCodeCompletions_languagesable) + } + } + m.SetLanguages(res) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetLanguages gets the languages property value. Code completion metrics for active languages. +// returns a []CopilotIdeCodeCompletions_languagesable when successful +func (m *CopilotIdeCodeCompletions) GetLanguages()([]CopilotIdeCodeCompletions_languagesable) { + return m.languages +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeCodeCompletions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEditors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEditors())) + for i, v := range m.GetEditors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("editors", cast) + if err != nil { + return err + } + } + if m.GetLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLanguages())) + for i, v := range m.GetLanguages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("languages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeCodeCompletions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEditors sets the editors property value. The editors property +func (m *CopilotIdeCodeCompletions) SetEditors(value []CopilotIdeCodeCompletions_editorsable)() { + m.editors = value +} +// SetLanguages sets the languages property value. Code completion metrics for active languages. +func (m *CopilotIdeCodeCompletions) SetLanguages(value []CopilotIdeCodeCompletions_languagesable)() { + m.languages = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeCodeCompletionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEditors()([]CopilotIdeCodeCompletions_editorsable) + GetLanguages()([]CopilotIdeCodeCompletions_languagesable) + GetTotalEngagedUsers()(*int32) + SetEditors(value []CopilotIdeCodeCompletions_editorsable)() + SetLanguages(value []CopilotIdeCodeCompletions_languagesable)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_code_completions_escaped_editors.go b/pkg/github/models/copilot_ide_code_completions_escaped_editors.go new file mode 100644 index 00000000..bb1f11b3 --- /dev/null +++ b/pkg/github/models/copilot_ide_code_completions_escaped_editors.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeCodeCompletions_editors copilot code completion metrics for active editors. +type CopilotIdeCodeCompletions_editors struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // List of model metrics for custom models and the default model. + models []CopilotIdeCodeCompletions_editors_modelsable + // Name of the given editor. + name *string + // Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. + total_engaged_users *int32 +} +// NewCopilotIdeCodeCompletions_editors instantiates a new CopilotIdeCodeCompletions_editors and sets the default values. +func NewCopilotIdeCodeCompletions_editors()(*CopilotIdeCodeCompletions_editors) { + m := &CopilotIdeCodeCompletions_editors{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeCodeCompletions_editorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeCodeCompletions_editorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeCodeCompletions_editors(), 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 *CopilotIdeCodeCompletions_editors) 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 *CopilotIdeCodeCompletions_editors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["models"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeCodeCompletions_editors_modelsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeCodeCompletions_editors_modelsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeCodeCompletions_editors_modelsable) + } + } + m.SetModels(res) + } + 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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetModels gets the models property value. List of model metrics for custom models and the default model. +// returns a []CopilotIdeCodeCompletions_editors_modelsable when successful +func (m *CopilotIdeCodeCompletions_editors) GetModels()([]CopilotIdeCodeCompletions_editors_modelsable) { + return m.models +} +// GetName gets the name property value. Name of the given editor. +// returns a *string when successful +func (m *CopilotIdeCodeCompletions_editors) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeCodeCompletions_editors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetModels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModels())) + for i, v := range m.GetModels() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("models", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeCodeCompletions_editors) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetModels sets the models property value. List of model metrics for custom models and the default model. +func (m *CopilotIdeCodeCompletions_editors) SetModels(value []CopilotIdeCodeCompletions_editors_modelsable)() { + m.models = value +} +// SetName sets the name property value. Name of the given editor. +func (m *CopilotIdeCodeCompletions_editors) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions_editors) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeCodeCompletions_editorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetModels()([]CopilotIdeCodeCompletions_editors_modelsable) + GetName()(*string) + GetTotalEngagedUsers()(*int32) + SetModels(value []CopilotIdeCodeCompletions_editors_modelsable)() + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go new file mode 100644 index 00000000..20fcb897 --- /dev/null +++ b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CopilotIdeCodeCompletions_editors_models 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 training date for the custom model. + custom_model_training_date *string + // Indicates whether a model is custom or default. + is_custom_model *bool + // Code completion metrics for active languages, for the given editor. + languages []CopilotIdeCodeCompletions_editors_models_languagesable + // Name of the language used for Copilot code completion suggestions, for the given editor. + name *string + // Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. + total_engaged_users *int32 +} +// NewCopilotIdeCodeCompletions_editors_models instantiates a new CopilotIdeCodeCompletions_editors_models and sets the default values. +func NewCopilotIdeCodeCompletions_editors_models()(*CopilotIdeCodeCompletions_editors_models) { + m := &CopilotIdeCodeCompletions_editors_models{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeCodeCompletions_editors_modelsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeCodeCompletions_editors_modelsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeCodeCompletions_editors_models(), 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 *CopilotIdeCodeCompletions_editors_models) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCustomModelTrainingDate gets the custom_model_training_date property value. The training date for the custom model. +// returns a *string when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetCustomModelTrainingDate()(*string) { + return m.custom_model_training_date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["custom_model_training_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomModelTrainingDate(val) + } + return nil + } + res["is_custom_model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomModel(val) + } + return nil + } + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCopilotIdeCodeCompletions_editors_models_languagesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CopilotIdeCodeCompletions_editors_models_languagesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CopilotIdeCodeCompletions_editors_models_languagesable) + } + } + m.SetLanguages(res) + } + 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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetIsCustomModel gets the is_custom_model property value. Indicates whether a model is custom or default. +// returns a *bool when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetIsCustomModel()(*bool) { + return m.is_custom_model +} +// GetLanguages gets the languages property value. Code completion metrics for active languages, for the given editor. +// returns a []CopilotIdeCodeCompletions_editors_models_languagesable when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetLanguages()([]CopilotIdeCodeCompletions_editors_models_languagesable) { + return m.languages +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// returns a *string when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeCodeCompletions_editors_models) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("custom_model_training_date", m.GetCustomModelTrainingDate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_custom_model", m.GetIsCustomModel()) + if err != nil { + return err + } + } + if m.GetLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLanguages())) + for i, v := range m.GetLanguages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("languages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeCodeCompletions_editors_models) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCustomModelTrainingDate sets the custom_model_training_date property value. The training date for the custom model. +func (m *CopilotIdeCodeCompletions_editors_models) SetCustomModelTrainingDate(value *string)() { + m.custom_model_training_date = value +} +// SetIsCustomModel sets the is_custom_model property value. Indicates whether a model is custom or default. +func (m *CopilotIdeCodeCompletions_editors_models) SetIsCustomModel(value *bool)() { + m.is_custom_model = value +} +// SetLanguages sets the languages property value. Code completion metrics for active languages, for the given editor. +func (m *CopilotIdeCodeCompletions_editors_models) SetLanguages(value []CopilotIdeCodeCompletions_editors_models_languagesable)() { + m.languages = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +func (m *CopilotIdeCodeCompletions_editors_models) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions_editors_models) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeCodeCompletions_editors_modelsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomModelTrainingDate()(*string) + GetIsCustomModel()(*bool) + GetLanguages()([]CopilotIdeCodeCompletions_editors_models_languagesable) + GetName()(*string) + GetTotalEngagedUsers()(*int32) + SetCustomModelTrainingDate(value *string)() + SetIsCustomModel(value *bool)() + SetLanguages(value []CopilotIdeCodeCompletions_editors_models_languagesable)() + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models_escaped_languages.go b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models_escaped_languages.go new file mode 100644 index 00000000..36b5c884 --- /dev/null +++ b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models_escaped_languages.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeCodeCompletions_editors_models_languages usage metrics for a given language for the given editor for Copilot code completions. +type CopilotIdeCodeCompletions_editors_models_languages struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the language used for Copilot code completion suggestions, for the given editor. + name *string + // The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. + total_code_acceptances *int32 + // The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. + total_code_lines_accepted *int32 + // The number of lines of code suggested by Copilot code completions for the given editor, for the given language. + total_code_lines_suggested *int32 + // The number of Copilot code suggestions generated for the given editor, for the given language. + total_code_suggestions *int32 + // Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. + total_engaged_users *int32 +} +// NewCopilotIdeCodeCompletions_editors_models_languages instantiates a new CopilotIdeCodeCompletions_editors_models_languages and sets the default values. +func NewCopilotIdeCodeCompletions_editors_models_languages()(*CopilotIdeCodeCompletions_editors_models_languages) { + m := &CopilotIdeCodeCompletions_editors_models_languages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeCodeCompletions_editors_models_languagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeCodeCompletions_editors_models_languagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeCodeCompletions_editors_models_languages(), 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 *CopilotIdeCodeCompletions_editors_models_languages) 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 *CopilotIdeCodeCompletions_editors_models_languages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["total_code_acceptances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCodeAcceptances(val) + } + return nil + } + res["total_code_lines_accepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCodeLinesAccepted(val) + } + return nil + } + res["total_code_lines_suggested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCodeLinesSuggested(val) + } + return nil + } + res["total_code_suggestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCodeSuggestions(val) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// returns a *string when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetName()(*string) { + return m.name +} +// GetTotalCodeAcceptances gets the total_code_acceptances property value. The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetTotalCodeAcceptances()(*int32) { + return m.total_code_acceptances +} +// GetTotalCodeLinesAccepted gets the total_code_lines_accepted property value. The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetTotalCodeLinesAccepted()(*int32) { + return m.total_code_lines_accepted +} +// GetTotalCodeLinesSuggested gets the total_code_lines_suggested property value. The number of lines of code suggested by Copilot code completions for the given editor, for the given language. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetTotalCodeLinesSuggested()(*int32) { + return m.total_code_lines_suggested +} +// GetTotalCodeSuggestions gets the total_code_suggestions property value. The number of Copilot code suggestions generated for the given editor, for the given language. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetTotalCodeSuggestions()(*int32) { + return m.total_code_suggestions +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_editors_models_languages) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeCodeCompletions_editors_models_languages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_code_acceptances", m.GetTotalCodeAcceptances()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_code_lines_accepted", m.GetTotalCodeLinesAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_code_lines_suggested", m.GetTotalCodeLinesSuggested()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_code_suggestions", m.GetTotalCodeSuggestions()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeCodeCompletions_editors_models_languages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetName(value *string)() { + m.name = value +} +// SetTotalCodeAcceptances sets the total_code_acceptances property value. The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetTotalCodeAcceptances(value *int32)() { + m.total_code_acceptances = value +} +// SetTotalCodeLinesAccepted sets the total_code_lines_accepted property value. The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetTotalCodeLinesAccepted(value *int32)() { + m.total_code_lines_accepted = value +} +// SetTotalCodeLinesSuggested sets the total_code_lines_suggested property value. The number of lines of code suggested by Copilot code completions for the given editor, for the given language. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetTotalCodeLinesSuggested(value *int32)() { + m.total_code_lines_suggested = value +} +// SetTotalCodeSuggestions sets the total_code_suggestions property value. The number of Copilot code suggestions generated for the given editor, for the given language. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetTotalCodeSuggestions(value *int32)() { + m.total_code_suggestions = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions_editors_models_languages) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeCodeCompletions_editors_models_languagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetTotalCodeAcceptances()(*int32) + GetTotalCodeLinesAccepted()(*int32) + GetTotalCodeLinesSuggested()(*int32) + GetTotalCodeSuggestions()(*int32) + GetTotalEngagedUsers()(*int32) + SetName(value *string)() + SetTotalCodeAcceptances(value *int32)() + SetTotalCodeLinesAccepted(value *int32)() + SetTotalCodeLinesSuggested(value *int32)() + SetTotalCodeSuggestions(value *int32)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_ide_code_completions_escaped_languages.go b/pkg/github/models/copilot_ide_code_completions_escaped_languages.go new file mode 100644 index 00000000..4131de17 --- /dev/null +++ b/pkg/github/models/copilot_ide_code_completions_escaped_languages.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotIdeCodeCompletions_languages usage metrics for a given language for the given editor for Copilot code completions. +type CopilotIdeCodeCompletions_languages struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the language used for Copilot code completion suggestions. + name *string + // Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. + total_engaged_users *int32 +} +// NewCopilotIdeCodeCompletions_languages instantiates a new CopilotIdeCodeCompletions_languages and sets the default values. +func NewCopilotIdeCodeCompletions_languages()(*CopilotIdeCodeCompletions_languages) { + m := &CopilotIdeCodeCompletions_languages{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotIdeCodeCompletions_languagesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotIdeCodeCompletions_languagesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotIdeCodeCompletions_languages(), 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 *CopilotIdeCodeCompletions_languages) 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 *CopilotIdeCodeCompletions_languages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the language used for Copilot code completion suggestions. +// returns a *string when successful +func (m *CopilotIdeCodeCompletions_languages) GetName()(*string) { + return m.name +} +// GetTotalEngagedUsers gets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. +// returns a *int32 when successful +func (m *CopilotIdeCodeCompletions_languages) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotIdeCodeCompletions_languages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotIdeCodeCompletions_languages) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the language used for Copilot code completion suggestions. +func (m *CopilotIdeCodeCompletions_languages) SetName(value *string)() { + m.name = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. +func (m *CopilotIdeCodeCompletions_languages) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotIdeCodeCompletions_languagesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetTotalEngagedUsers()(*int32) + SetName(value *string)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/copilot_usage_metrics_day.go b/pkg/github/models/copilot_usage_metrics_day.go new file mode 100644 index 00000000..55c181d8 --- /dev/null +++ b/pkg/github/models/copilot_usage_metrics_day.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotUsageMetricsDay copilot usage metrics for a given day. +type CopilotUsageMetricsDay struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Usage metrics for Copilot Chat in github.com + copilot_dotcom_chat CopilotDotcomChatable + // Usage metrics for Copilot for pull requests. + copilot_dotcom_pull_requests CopilotDotcomPullRequestsable + // Usage metrics for Copilot Chat in the IDE. + copilot_ide_chat CopilotIdeChatable + // Usage metrics for Copilot editor code completions in the IDE. + copilot_ide_code_completions CopilotIdeCodeCompletionsable + // The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. + date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + total_active_users *int32 + // The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + total_engaged_users *int32 +} +// NewCopilotUsageMetricsDay instantiates a new CopilotUsageMetricsDay and sets the default values. +func NewCopilotUsageMetricsDay()(*CopilotUsageMetricsDay) { + m := &CopilotUsageMetricsDay{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotUsageMetricsDayFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotUsageMetricsDayFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotUsageMetricsDay(), 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 *CopilotUsageMetricsDay) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCopilotDotcomChat gets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in github.com +// returns a CopilotDotcomChatable when successful +func (m *CopilotUsageMetricsDay) GetCopilotDotcomChat()(CopilotDotcomChatable) { + return m.copilot_dotcom_chat +} +// GetCopilotDotcomPullRequests gets the copilot_dotcom_pull_requests property value. Usage metrics for Copilot for pull requests. +// returns a CopilotDotcomPullRequestsable when successful +func (m *CopilotUsageMetricsDay) GetCopilotDotcomPullRequests()(CopilotDotcomPullRequestsable) { + return m.copilot_dotcom_pull_requests +} +// GetCopilotIdeChat gets the copilot_ide_chat property value. Usage metrics for Copilot Chat in the IDE. +// returns a CopilotIdeChatable when successful +func (m *CopilotUsageMetricsDay) GetCopilotIdeChat()(CopilotIdeChatable) { + return m.copilot_ide_chat +} +// GetCopilotIdeCodeCompletions gets the copilot_ide_code_completions property value. Usage metrics for Copilot editor code completions in the IDE. +// returns a CopilotIdeCodeCompletionsable when successful +func (m *CopilotUsageMetricsDay) GetCopilotIdeCodeCompletions()(CopilotIdeCodeCompletionsable) { + return m.copilot_ide_code_completions +} +// GetDate gets the date property value. The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. +// returns a *DateOnly when successful +func (m *CopilotUsageMetricsDay) GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.date +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotUsageMetricsDay) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["copilot_dotcom_chat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotDotcomChatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCopilotDotcomChat(val.(CopilotDotcomChatable)) + } + return nil + } + res["copilot_dotcom_pull_requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotDotcomPullRequestsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCopilotDotcomPullRequests(val.(CopilotDotcomPullRequestsable)) + } + return nil + } + res["copilot_ide_chat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotIdeChatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCopilotIdeChat(val.(CopilotIdeChatable)) + } + return nil + } + res["copilot_ide_code_completions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotIdeCodeCompletionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCopilotIdeCodeCompletions(val.(CopilotIdeCodeCompletionsable)) + } + return nil + } + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["total_active_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalActiveUsers(val) + } + return nil + } + res["total_engaged_users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEngagedUsers(val) + } + return nil + } + return res +} +// GetTotalActiveUsers gets the total_active_users property value. The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. +// returns a *int32 when successful +func (m *CopilotUsageMetricsDay) GetTotalActiveUsers()(*int32) { + return m.total_active_users +} +// GetTotalEngagedUsers gets the total_engaged_users property value. The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. +// returns a *int32 when successful +func (m *CopilotUsageMetricsDay) GetTotalEngagedUsers()(*int32) { + return m.total_engaged_users +} +// Serialize serializes information the current object +func (m *CopilotUsageMetricsDay) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("copilot_dotcom_chat", m.GetCopilotDotcomChat()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("copilot_dotcom_pull_requests", m.GetCopilotDotcomPullRequests()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("copilot_ide_chat", m.GetCopilotIdeChat()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("copilot_ide_code_completions", m.GetCopilotIdeCodeCompletions()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_active_users", m.GetTotalActiveUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_engaged_users", m.GetTotalEngagedUsers()) + 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 *CopilotUsageMetricsDay) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCopilotDotcomChat sets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in github.com +func (m *CopilotUsageMetricsDay) SetCopilotDotcomChat(value CopilotDotcomChatable)() { + m.copilot_dotcom_chat = value +} +// SetCopilotDotcomPullRequests sets the copilot_dotcom_pull_requests property value. Usage metrics for Copilot for pull requests. +func (m *CopilotUsageMetricsDay) SetCopilotDotcomPullRequests(value CopilotDotcomPullRequestsable)() { + m.copilot_dotcom_pull_requests = value +} +// SetCopilotIdeChat sets the copilot_ide_chat property value. Usage metrics for Copilot Chat in the IDE. +func (m *CopilotUsageMetricsDay) SetCopilotIdeChat(value CopilotIdeChatable)() { + m.copilot_ide_chat = value +} +// SetCopilotIdeCodeCompletions sets the copilot_ide_code_completions property value. Usage metrics for Copilot editor code completions in the IDE. +func (m *CopilotUsageMetricsDay) SetCopilotIdeCodeCompletions(value CopilotIdeCodeCompletionsable)() { + m.copilot_ide_code_completions = value +} +// SetDate sets the date property value. The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. +func (m *CopilotUsageMetricsDay) SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.date = value +} +// SetTotalActiveUsers sets the total_active_users property value. The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. +func (m *CopilotUsageMetricsDay) SetTotalActiveUsers(value *int32)() { + m.total_active_users = value +} +// SetTotalEngagedUsers sets the total_engaged_users property value. The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. +func (m *CopilotUsageMetricsDay) SetTotalEngagedUsers(value *int32)() { + m.total_engaged_users = value +} +type CopilotUsageMetricsDayable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCopilotDotcomChat()(CopilotDotcomChatable) + GetCopilotDotcomPullRequests()(CopilotDotcomPullRequestsable) + GetCopilotIdeChat()(CopilotIdeChatable) + GetCopilotIdeCodeCompletions()(CopilotIdeCodeCompletionsable) + GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTotalActiveUsers()(*int32) + GetTotalEngagedUsers()(*int32) + SetCopilotDotcomChat(value CopilotDotcomChatable)() + SetCopilotDotcomPullRequests(value CopilotDotcomPullRequestsable)() + SetCopilotIdeChat(value CopilotIdeChatable)() + SetCopilotIdeCodeCompletions(value CopilotIdeCodeCompletionsable)() + SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTotalActiveUsers(value *int32)() + SetTotalEngagedUsers(value *int32)() +} diff --git a/pkg/github/models/pull_request_escaped_base.go b/pkg/github/models/pull_request_escaped_base.go index 141ccdc6..3f68e8c3 100644 --- a/pkg/github/models/pull_request_escaped_base.go +++ b/pkg/github/models/pull_request_escaped_base.go @@ -11,12 +11,12 @@ type PullRequest_base struct { label *string // The ref property ref *string - // The repo property - repo PullRequest_base_repoable + // A repository on GitHub. + repo Repositoryable // The sha property sha *string - // The user property - user PullRequest_base_userable + // A GitHub user. + user SimpleUserable } // NewPullRequest_base instantiates a new PullRequest_base and sets the default values. func NewPullRequest_base()(*PullRequest_base) { @@ -60,12 +60,12 @@ func (m *PullRequest_base) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_base_repoFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetRepo(val.(PullRequest_base_repoable)) + m.SetRepo(val.(Repositoryable)) } return nil } @@ -80,12 +80,12 @@ func (m *PullRequest_base) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_base_userFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetUser(val.(PullRequest_base_userable)) + m.SetUser(val.(SimpleUserable)) } return nil } @@ -101,9 +101,9 @@ func (m *PullRequest_base) GetLabel()(*string) { func (m *PullRequest_base) GetRef()(*string) { return m.ref } -// GetRepo gets the repo property value. The repo property -// returns a PullRequest_base_repoable when successful -func (m *PullRequest_base) GetRepo()(PullRequest_base_repoable) { +// GetRepo gets the repo property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *PullRequest_base) GetRepo()(Repositoryable) { return m.repo } // GetSha gets the sha property value. The sha property @@ -111,9 +111,9 @@ func (m *PullRequest_base) GetRepo()(PullRequest_base_repoable) { func (m *PullRequest_base) GetSha()(*string) { return m.sha } -// GetUser gets the user property value. The user property -// returns a PullRequest_base_userable when successful -func (m *PullRequest_base) GetUser()(PullRequest_base_userable) { +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *PullRequest_base) GetUser()(SimpleUserable) { return m.user } // Serialize serializes information the current object @@ -168,16 +168,16 @@ func (m *PullRequest_base) SetLabel(value *string)() { func (m *PullRequest_base) SetRef(value *string)() { m.ref = value } -// SetRepo sets the repo property value. The repo property -func (m *PullRequest_base) SetRepo(value PullRequest_base_repoable)() { +// SetRepo sets the repo property value. A repository on GitHub. +func (m *PullRequest_base) SetRepo(value Repositoryable)() { m.repo = value } // SetSha sets the sha property value. The sha property func (m *PullRequest_base) SetSha(value *string)() { m.sha = value } -// SetUser sets the user property value. The user property -func (m *PullRequest_base) SetUser(value PullRequest_base_userable)() { +// SetUser sets the user property value. A GitHub user. +func (m *PullRequest_base) SetUser(value SimpleUserable)() { m.user = value } type PullRequest_baseable interface { @@ -185,12 +185,12 @@ type PullRequest_baseable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetLabel()(*string) GetRef()(*string) - GetRepo()(PullRequest_base_repoable) + GetRepo()(Repositoryable) GetSha()(*string) - GetUser()(PullRequest_base_userable) + GetUser()(SimpleUserable) SetLabel(value *string)() SetRef(value *string)() - SetRepo(value PullRequest_base_repoable)() + SetRepo(value Repositoryable)() SetSha(value *string)() - SetUser(value PullRequest_base_userable)() + SetUser(value SimpleUserable)() } diff --git a/pkg/github/models/pull_request_escaped_base_escaped_repo.go b/pkg/github/models/pull_request_escaped_base_escaped_repo.go deleted file mode 100644 index 8a586046..00000000 --- a/pkg/github/models/pull_request_escaped_base_escaped_repo.go +++ /dev/null @@ -1,2523 +0,0 @@ -package models - -import ( - i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_base_repo 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 allow_forking property - allow_forking *bool - // The allow_merge_commit property - allow_merge_commit *bool - // The allow_rebase_merge property - allow_rebase_merge *bool - // The allow_squash_merge property - allow_squash_merge *bool - // The archive_url property - archive_url *string - // The archived property - archived *bool - // The assignees_url property - assignees_url *string - // The blobs_url property - blobs_url *string - // The branches_url property - branches_url *string - // The clone_url property - clone_url *string - // The collaborators_url property - collaborators_url *string - // The comments_url property - comments_url *string - // The commits_url property - commits_url *string - // The compare_url property - compare_url *string - // The contents_url property - contents_url *string - // The contributors_url property - contributors_url *string - // The created_at property - created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The default_branch property - default_branch *string - // The deployments_url property - deployments_url *string - // The description property - description *string - // The disabled property - disabled *bool - // The downloads_url property - downloads_url *string - // The events_url property - events_url *string - // The fork property - fork *bool - // The forks property - forks *int32 - // The forks_count property - forks_count *int32 - // The forks_url property - forks_url *string - // The full_name property - full_name *string - // The git_commits_url property - git_commits_url *string - // The git_refs_url property - git_refs_url *string - // The git_tags_url property - git_tags_url *string - // The git_url property - git_url *string - // The has_discussions property - has_discussions *bool - // The has_downloads property - has_downloads *bool - // The has_issues property - has_issues *bool - // The has_pages property - has_pages *bool - // The has_projects property - has_projects *bool - // The has_wiki property - has_wiki *bool - // The homepage property - homepage *string - // The hooks_url property - hooks_url *string - // The html_url property - html_url *string - // The id property - id *int32 - // The is_template property - is_template *bool - // The issue_comment_url property - issue_comment_url *string - // The issue_events_url property - issue_events_url *string - // The issues_url property - issues_url *string - // The keys_url property - keys_url *string - // The labels_url property - labels_url *string - // The language property - language *string - // The languages_url property - languages_url *string - // License Simple - license NullableLicenseSimpleable - // The master_branch property - master_branch *string - // The merges_url property - merges_url *string - // The milestones_url property - milestones_url *string - // The mirror_url property - mirror_url *string - // The name property - name *string - // The node_id property - node_id *string - // The notifications_url property - notifications_url *string - // The open_issues property - open_issues *int32 - // The open_issues_count property - open_issues_count *int32 - // The owner property - owner PullRequest_base_repo_ownerable - // The permissions property - permissions PullRequest_base_repo_permissionsable - // The private property - private *bool - // The pulls_url property - pulls_url *string - // The pushed_at property - pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The releases_url property - releases_url *string - // The size property - size *int32 - // The ssh_url property - ssh_url *string - // The stargazers_count property - stargazers_count *int32 - // The stargazers_url property - stargazers_url *string - // The statuses_url property - statuses_url *string - // The subscribers_url property - subscribers_url *string - // The subscription_url property - subscription_url *string - // The svn_url property - svn_url *string - // The tags_url property - tags_url *string - // The teams_url property - teams_url *string - // The temp_clone_token property - temp_clone_token *string - // The topics property - topics []string - // The trees_url property - trees_url *string - // The updated_at property - updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The url property - url *string - // The repository visibility: public, private, or internal. - visibility *string - // The watchers property - watchers *int32 - // The watchers_count property - watchers_count *int32 - // The web_commit_signoff_required property - web_commit_signoff_required *bool -} -// NewPullRequest_base_repo instantiates a new PullRequest_base_repo and sets the default values. -func NewPullRequest_base_repo()(*PullRequest_base_repo) { - m := &PullRequest_base_repo{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_base_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_base_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_base_repo(), 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 *PullRequest_base_repo) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAllowForking gets the allow_forking property value. The allow_forking property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetAllowForking()(*bool) { - return m.allow_forking -} -// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetAllowMergeCommit()(*bool) { - return m.allow_merge_commit -} -// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetAllowRebaseMerge()(*bool) { - return m.allow_rebase_merge -} -// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetAllowSquashMerge()(*bool) { - return m.allow_squash_merge -} -// GetArchived gets the archived property value. The archived property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetArchived()(*bool) { - return m.archived -} -// GetArchiveUrl gets the archive_url property value. The archive_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetArchiveUrl()(*string) { - return m.archive_url -} -// GetAssigneesUrl gets the assignees_url property value. The assignees_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetAssigneesUrl()(*string) { - return m.assignees_url -} -// GetBlobsUrl gets the blobs_url property value. The blobs_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetBlobsUrl()(*string) { - return m.blobs_url -} -// GetBranchesUrl gets the branches_url property value. The branches_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetBranchesUrl()(*string) { - return m.branches_url -} -// GetCloneUrl gets the clone_url property value. The clone_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetCloneUrl()(*string) { - return m.clone_url -} -// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetCollaboratorsUrl()(*string) { - return m.collaborators_url -} -// GetCommentsUrl gets the comments_url property value. The comments_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetCommentsUrl()(*string) { - return m.comments_url -} -// GetCommitsUrl gets the commits_url property value. The commits_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetCommitsUrl()(*string) { - return m.commits_url -} -// GetCompareUrl gets the compare_url property value. The compare_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetCompareUrl()(*string) { - return m.compare_url -} -// GetContentsUrl gets the contents_url property value. The contents_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetContentsUrl()(*string) { - return m.contents_url -} -// GetContributorsUrl gets the contributors_url property value. The contributors_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetContributorsUrl()(*string) { - return m.contributors_url -} -// GetCreatedAt gets the created_at property value. The created_at property -// returns a *Time when successful -func (m *PullRequest_base_repo) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.created_at -} -// GetDefaultBranch gets the default_branch property value. The default_branch property -// returns a *string when successful -func (m *PullRequest_base_repo) GetDefaultBranch()(*string) { - return m.default_branch -} -// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetDeploymentsUrl()(*string) { - return m.deployments_url -} -// GetDescription gets the description property value. The description property -// returns a *string when successful -func (m *PullRequest_base_repo) GetDescription()(*string) { - return m.description -} -// GetDisabled gets the disabled property value. The disabled property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetDisabled()(*bool) { - return m.disabled -} -// GetDownloadsUrl gets the downloads_url property value. The downloads_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetDownloadsUrl()(*string) { - return m.downloads_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_base_repo) 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 *PullRequest_base_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowForking(val) - } - return nil - } - res["allow_merge_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowMergeCommit(val) - } - return nil - } - res["allow_rebase_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowRebaseMerge(val) - } - return nil - } - res["allow_squash_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowSquashMerge(val) - } - return nil - } - res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetArchiveUrl(val) - } - return nil - } - res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetArchived(val) - } - return nil - } - res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetAssigneesUrl(val) - } - return nil - } - res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetBlobsUrl(val) - } - return nil - } - res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetBranchesUrl(val) - } - return nil - } - res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCloneUrl(val) - } - return nil - } - res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCollaboratorsUrl(val) - } - return nil - } - res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCommentsUrl(val) - } - return nil - } - res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCommitsUrl(val) - } - return nil - } - res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCompareUrl(val) - } - return nil - } - res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetContentsUrl(val) - } - return nil - } - res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetContributorsUrl(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["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDefaultBranch(val) - } - return nil - } - res["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDeploymentsUrl(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["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetDisabled(val) - } - return nil - } - res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDownloadsUrl(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["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetFork(val) - } - return nil - } - res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetForks(val) - } - return nil - } - res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetForksCount(val) - } - return nil - } - res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetForksUrl(val) - } - return nil - } - res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFullName(val) - } - return nil - } - res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitCommitsUrl(val) - } - return nil - } - res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitRefsUrl(val) - } - return nil - } - res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitTagsUrl(val) - } - return nil - } - res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitUrl(val) - } - return nil - } - res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasDiscussions(val) - } - return nil - } - res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasDownloads(val) - } - return nil - } - res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasIssues(val) - } - return nil - } - res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasPages(val) - } - return nil - } - res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasProjects(val) - } - return nil - } - res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasWiki(val) - } - return nil - } - res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetHomepage(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_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetIsTemplate(val) - } - return nil - } - res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIssueCommentUrl(val) - } - return nil - } - res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIssueEventsUrl(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["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKeysUrl(val) - } - return nil - } - res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLabelsUrl(val) - } - return nil - } - res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLanguage(val) - } - return nil - } - res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLanguagesUrl(val) - } - return nil - } - res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateNullableLicenseSimpleFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetLicense(val.(NullableLicenseSimpleable)) - } - return nil - } - res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMasterBranch(val) - } - return nil - } - res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMergesUrl(val) - } - return nil - } - res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMilestonesUrl(val) - } - return nil - } - res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMirrorUrl(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["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetNotificationsUrl(val) - } - return nil - } - res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetOpenIssues(val) - } - return nil - } - res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetOpenIssuesCount(val) - } - return nil - } - res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_base_repo_ownerFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetOwner(val.(PullRequest_base_repo_ownerable)) - } - return nil - } - res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_base_repo_permissionsFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetPermissions(val.(PullRequest_base_repo_permissionsable)) - } - return nil - } - res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPrivate(val) - } - return nil - } - res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPullsUrl(val) - } - return nil - } - res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetTimeValue() - if err != nil { - return err - } - if val != nil { - m.SetPushedAt(val) - } - return nil - } - res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReleasesUrl(val) - } - return nil - } - res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetSize(val) - } - return nil - } - res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSshUrl(val) - } - return nil - } - res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetStargazersCount(val) - } - return nil - } - res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStargazersUrl(val) - } - return nil - } - res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStatusesUrl(val) - } - return nil - } - res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscribersUrl(val) - } - return nil - } - res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionUrl(val) - } - return nil - } - res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSvnUrl(val) - } - return nil - } - res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTagsUrl(val) - } - return nil - } - res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTeamsUrl(val) - } - return nil - } - res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTempCloneToken(val) - } - return nil - } - res["topics"] = 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.SetTopics(res) - } - return nil - } - res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTreesUrl(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 - } - res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetVisibility(val) - } - return nil - } - res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetWatchers(val) - } - return nil - } - res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetWatchersCount(val) - } - return nil - } - res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetWebCommitSignoffRequired(val) - } - return nil - } - return res -} -// GetFork gets the fork property value. The fork property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetFork()(*bool) { - return m.fork -} -// GetForks gets the forks property value. The forks property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetForks()(*int32) { - return m.forks -} -// GetForksCount gets the forks_count property value. The forks_count property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetForksCount()(*int32) { - return m.forks_count -} -// GetForksUrl gets the forks_url property value. The forks_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetForksUrl()(*string) { - return m.forks_url -} -// GetFullName gets the full_name property value. The full_name property -// returns a *string when successful -func (m *PullRequest_base_repo) GetFullName()(*string) { - return m.full_name -} -// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetGitCommitsUrl()(*string) { - return m.git_commits_url -} -// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetGitRefsUrl()(*string) { - return m.git_refs_url -} -// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetGitTagsUrl()(*string) { - return m.git_tags_url -} -// GetGitUrl gets the git_url property value. The git_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetGitUrl()(*string) { - return m.git_url -} -// GetHasDiscussions gets the has_discussions property value. The has_discussions property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasDiscussions()(*bool) { - return m.has_discussions -} -// GetHasDownloads gets the has_downloads property value. The has_downloads property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasDownloads()(*bool) { - return m.has_downloads -} -// GetHasIssues gets the has_issues property value. The has_issues property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasIssues()(*bool) { - return m.has_issues -} -// GetHasPages gets the has_pages property value. The has_pages property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasPages()(*bool) { - return m.has_pages -} -// GetHasProjects gets the has_projects property value. The has_projects property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasProjects()(*bool) { - return m.has_projects -} -// GetHasWiki gets the has_wiki property value. The has_wiki property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetHasWiki()(*bool) { - return m.has_wiki -} -// GetHomepage gets the homepage property value. The homepage property -// returns a *string when successful -func (m *PullRequest_base_repo) GetHomepage()(*string) { - return m.homepage -} -// GetHooksUrl gets the hooks_url property value. The hooks_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetHooksUrl()(*string) { - return m.hooks_url -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetId()(*int32) { - return m.id -} -// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetIssueCommentUrl()(*string) { - return m.issue_comment_url -} -// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetIssueEventsUrl()(*string) { - return m.issue_events_url -} -// GetIssuesUrl gets the issues_url property value. The issues_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetIssuesUrl()(*string) { - return m.issues_url -} -// GetIsTemplate gets the is_template property value. The is_template property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetIsTemplate()(*bool) { - return m.is_template -} -// GetKeysUrl gets the keys_url property value. The keys_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetKeysUrl()(*string) { - return m.keys_url -} -// GetLabelsUrl gets the labels_url property value. The labels_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetLabelsUrl()(*string) { - return m.labels_url -} -// GetLanguage gets the language property value. The language property -// returns a *string when successful -func (m *PullRequest_base_repo) GetLanguage()(*string) { - return m.language -} -// GetLanguagesUrl gets the languages_url property value. The languages_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetLanguagesUrl()(*string) { - return m.languages_url -} -// GetLicense gets the license property value. License Simple -// returns a NullableLicenseSimpleable when successful -func (m *PullRequest_base_repo) GetLicense()(NullableLicenseSimpleable) { - return m.license -} -// GetMasterBranch gets the master_branch property value. The master_branch property -// returns a *string when successful -func (m *PullRequest_base_repo) GetMasterBranch()(*string) { - return m.master_branch -} -// GetMergesUrl gets the merges_url property value. The merges_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetMergesUrl()(*string) { - return m.merges_url -} -// GetMilestonesUrl gets the milestones_url property value. The milestones_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetMilestonesUrl()(*string) { - return m.milestones_url -} -// GetMirrorUrl gets the mirror_url property value. The mirror_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetMirrorUrl()(*string) { - return m.mirror_url -} -// GetName gets the name property value. The name property -// returns a *string when successful -func (m *PullRequest_base_repo) GetName()(*string) { - return m.name -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_base_repo) GetNodeId()(*string) { - return m.node_id -} -// GetNotificationsUrl gets the notifications_url property value. The notifications_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetNotificationsUrl()(*string) { - return m.notifications_url -} -// GetOpenIssues gets the open_issues property value. The open_issues property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetOpenIssues()(*int32) { - return m.open_issues -} -// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetOpenIssuesCount()(*int32) { - return m.open_issues_count -} -// GetOwner gets the owner property value. The owner property -// returns a PullRequest_base_repo_ownerable when successful -func (m *PullRequest_base_repo) GetOwner()(PullRequest_base_repo_ownerable) { - return m.owner -} -// GetPermissions gets the permissions property value. The permissions property -// returns a PullRequest_base_repo_permissionsable when successful -func (m *PullRequest_base_repo) GetPermissions()(PullRequest_base_repo_permissionsable) { - return m.permissions -} -// GetPrivate gets the private property value. The private property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetPrivate()(*bool) { - return m.private -} -// GetPullsUrl gets the pulls_url property value. The pulls_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetPullsUrl()(*string) { - return m.pulls_url -} -// GetPushedAt gets the pushed_at property value. The pushed_at property -// returns a *Time when successful -func (m *PullRequest_base_repo) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.pushed_at -} -// GetReleasesUrl gets the releases_url property value. The releases_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetReleasesUrl()(*string) { - return m.releases_url -} -// GetSize gets the size property value. The size property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetSize()(*int32) { - return m.size -} -// GetSshUrl gets the ssh_url property value. The ssh_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetSshUrl()(*string) { - return m.ssh_url -} -// GetStargazersCount gets the stargazers_count property value. The stargazers_count property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetStargazersCount()(*int32) { - return m.stargazers_count -} -// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetStargazersUrl()(*string) { - return m.stargazers_url -} -// GetStatusesUrl gets the statuses_url property value. The statuses_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetStatusesUrl()(*string) { - return m.statuses_url -} -// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetSubscribersUrl()(*string) { - return m.subscribers_url -} -// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetSubscriptionUrl()(*string) { - return m.subscription_url -} -// GetSvnUrl gets the svn_url property value. The svn_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetSvnUrl()(*string) { - return m.svn_url -} -// GetTagsUrl gets the tags_url property value. The tags_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetTagsUrl()(*string) { - return m.tags_url -} -// GetTeamsUrl gets the teams_url property value. The teams_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetTeamsUrl()(*string) { - return m.teams_url -} -// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property -// returns a *string when successful -func (m *PullRequest_base_repo) GetTempCloneToken()(*string) { - return m.temp_clone_token -} -// GetTopics gets the topics property value. The topics property -// returns a []string when successful -func (m *PullRequest_base_repo) GetTopics()([]string) { - return m.topics -} -// GetTreesUrl gets the trees_url property value. The trees_url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetTreesUrl()(*string) { - return m.trees_url -} -// GetUpdatedAt gets the updated_at property value. The updated_at property -// returns a *Time when successful -func (m *PullRequest_base_repo) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.updated_at -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_base_repo) GetUrl()(*string) { - return m.url -} -// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. -// returns a *string when successful -func (m *PullRequest_base_repo) GetVisibility()(*string) { - return m.visibility -} -// GetWatchers gets the watchers property value. The watchers property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetWatchers()(*int32) { - return m.watchers -} -// GetWatchersCount gets the watchers_count property value. The watchers_count property -// returns a *int32 when successful -func (m *PullRequest_base_repo) GetWatchersCount()(*int32) { - return m.watchers_count -} -// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property -// returns a *bool when successful -func (m *PullRequest_base_repo) GetWebCommitSignoffRequired()(*bool) { - return m.web_commit_signoff_required -} -// Serialize serializes information the current object -func (m *PullRequest_base_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_merge_commit", m.GetAllowMergeCommit()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_rebase_merge", m.GetAllowRebaseMerge()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_squash_merge", m.GetAllowSquashMerge()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("archived", m.GetArchived()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("description", m.GetDescription()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("disabled", m.GetDisabled()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("fork", m.GetFork()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("forks", m.GetForks()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("forks_count", m.GetForksCount()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("forks_url", m.GetForksUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("full_name", m.GetFullName()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_url", m.GetGitUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_pages", m.GetHasPages()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("homepage", m.GetHomepage()) - 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.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("language", m.GetLanguage()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("license", m.GetLicense()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) - 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.WriteStringValue("notifications_url", m.GetNotificationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("owner", m.GetOwner()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("permissions", m.GetPermissions()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("private", m.GetPrivate()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("size", m.GetSize()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) - if err != nil { - return err - } - } - if m.GetTopics() != nil { - err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) - 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.WriteStringValue("visibility", m.GetVisibility()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("watchers", m.GetWatchers()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) - 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 *PullRequest_base_repo) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAllowForking sets the allow_forking property value. The allow_forking property -func (m *PullRequest_base_repo) SetAllowForking(value *bool)() { - m.allow_forking = value -} -// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property -func (m *PullRequest_base_repo) SetAllowMergeCommit(value *bool)() { - m.allow_merge_commit = value -} -// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property -func (m *PullRequest_base_repo) SetAllowRebaseMerge(value *bool)() { - m.allow_rebase_merge = value -} -// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property -func (m *PullRequest_base_repo) SetAllowSquashMerge(value *bool)() { - m.allow_squash_merge = value -} -// SetArchived sets the archived property value. The archived property -func (m *PullRequest_base_repo) SetArchived(value *bool)() { - m.archived = value -} -// SetArchiveUrl sets the archive_url property value. The archive_url property -func (m *PullRequest_base_repo) SetArchiveUrl(value *string)() { - m.archive_url = value -} -// SetAssigneesUrl sets the assignees_url property value. The assignees_url property -func (m *PullRequest_base_repo) SetAssigneesUrl(value *string)() { - m.assignees_url = value -} -// SetBlobsUrl sets the blobs_url property value. The blobs_url property -func (m *PullRequest_base_repo) SetBlobsUrl(value *string)() { - m.blobs_url = value -} -// SetBranchesUrl sets the branches_url property value. The branches_url property -func (m *PullRequest_base_repo) SetBranchesUrl(value *string)() { - m.branches_url = value -} -// SetCloneUrl sets the clone_url property value. The clone_url property -func (m *PullRequest_base_repo) SetCloneUrl(value *string)() { - m.clone_url = value -} -// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property -func (m *PullRequest_base_repo) SetCollaboratorsUrl(value *string)() { - m.collaborators_url = value -} -// SetCommentsUrl sets the comments_url property value. The comments_url property -func (m *PullRequest_base_repo) SetCommentsUrl(value *string)() { - m.comments_url = value -} -// SetCommitsUrl sets the commits_url property value. The commits_url property -func (m *PullRequest_base_repo) SetCommitsUrl(value *string)() { - m.commits_url = value -} -// SetCompareUrl sets the compare_url property value. The compare_url property -func (m *PullRequest_base_repo) SetCompareUrl(value *string)() { - m.compare_url = value -} -// SetContentsUrl sets the contents_url property value. The contents_url property -func (m *PullRequest_base_repo) SetContentsUrl(value *string)() { - m.contents_url = value -} -// SetContributorsUrl sets the contributors_url property value. The contributors_url property -func (m *PullRequest_base_repo) SetContributorsUrl(value *string)() { - m.contributors_url = value -} -// SetCreatedAt sets the created_at property value. The created_at property -func (m *PullRequest_base_repo) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.created_at = value -} -// SetDefaultBranch sets the default_branch property value. The default_branch property -func (m *PullRequest_base_repo) SetDefaultBranch(value *string)() { - m.default_branch = value -} -// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property -func (m *PullRequest_base_repo) SetDeploymentsUrl(value *string)() { - m.deployments_url = value -} -// SetDescription sets the description property value. The description property -func (m *PullRequest_base_repo) SetDescription(value *string)() { - m.description = value -} -// SetDisabled sets the disabled property value. The disabled property -func (m *PullRequest_base_repo) SetDisabled(value *bool)() { - m.disabled = value -} -// SetDownloadsUrl sets the downloads_url property value. The downloads_url property -func (m *PullRequest_base_repo) SetDownloadsUrl(value *string)() { - m.downloads_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_base_repo) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFork sets the fork property value. The fork property -func (m *PullRequest_base_repo) SetFork(value *bool)() { - m.fork = value -} -// SetForks sets the forks property value. The forks property -func (m *PullRequest_base_repo) SetForks(value *int32)() { - m.forks = value -} -// SetForksCount sets the forks_count property value. The forks_count property -func (m *PullRequest_base_repo) SetForksCount(value *int32)() { - m.forks_count = value -} -// SetForksUrl sets the forks_url property value. The forks_url property -func (m *PullRequest_base_repo) SetForksUrl(value *string)() { - m.forks_url = value -} -// SetFullName sets the full_name property value. The full_name property -func (m *PullRequest_base_repo) SetFullName(value *string)() { - m.full_name = value -} -// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property -func (m *PullRequest_base_repo) SetGitCommitsUrl(value *string)() { - m.git_commits_url = value -} -// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property -func (m *PullRequest_base_repo) SetGitRefsUrl(value *string)() { - m.git_refs_url = value -} -// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property -func (m *PullRequest_base_repo) SetGitTagsUrl(value *string)() { - m.git_tags_url = value -} -// SetGitUrl sets the git_url property value. The git_url property -func (m *PullRequest_base_repo) SetGitUrl(value *string)() { - m.git_url = value -} -// SetHasDiscussions sets the has_discussions property value. The has_discussions property -func (m *PullRequest_base_repo) SetHasDiscussions(value *bool)() { - m.has_discussions = value -} -// SetHasDownloads sets the has_downloads property value. The has_downloads property -func (m *PullRequest_base_repo) SetHasDownloads(value *bool)() { - m.has_downloads = value -} -// SetHasIssues sets the has_issues property value. The has_issues property -func (m *PullRequest_base_repo) SetHasIssues(value *bool)() { - m.has_issues = value -} -// SetHasPages sets the has_pages property value. The has_pages property -func (m *PullRequest_base_repo) SetHasPages(value *bool)() { - m.has_pages = value -} -// SetHasProjects sets the has_projects property value. The has_projects property -func (m *PullRequest_base_repo) SetHasProjects(value *bool)() { - m.has_projects = value -} -// SetHasWiki sets the has_wiki property value. The has_wiki property -func (m *PullRequest_base_repo) SetHasWiki(value *bool)() { - m.has_wiki = value -} -// SetHomepage sets the homepage property value. The homepage property -func (m *PullRequest_base_repo) SetHomepage(value *string)() { - m.homepage = value -} -// SetHooksUrl sets the hooks_url property value. The hooks_url property -func (m *PullRequest_base_repo) SetHooksUrl(value *string)() { - m.hooks_url = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_base_repo) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_base_repo) SetId(value *int32)() { - m.id = value -} -// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property -func (m *PullRequest_base_repo) SetIssueCommentUrl(value *string)() { - m.issue_comment_url = value -} -// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property -func (m *PullRequest_base_repo) SetIssueEventsUrl(value *string)() { - m.issue_events_url = value -} -// SetIssuesUrl sets the issues_url property value. The issues_url property -func (m *PullRequest_base_repo) SetIssuesUrl(value *string)() { - m.issues_url = value -} -// SetIsTemplate sets the is_template property value. The is_template property -func (m *PullRequest_base_repo) SetIsTemplate(value *bool)() { - m.is_template = value -} -// SetKeysUrl sets the keys_url property value. The keys_url property -func (m *PullRequest_base_repo) SetKeysUrl(value *string)() { - m.keys_url = value -} -// SetLabelsUrl sets the labels_url property value. The labels_url property -func (m *PullRequest_base_repo) SetLabelsUrl(value *string)() { - m.labels_url = value -} -// SetLanguage sets the language property value. The language property -func (m *PullRequest_base_repo) SetLanguage(value *string)() { - m.language = value -} -// SetLanguagesUrl sets the languages_url property value. The languages_url property -func (m *PullRequest_base_repo) SetLanguagesUrl(value *string)() { - m.languages_url = value -} -// SetLicense sets the license property value. License Simple -func (m *PullRequest_base_repo) SetLicense(value NullableLicenseSimpleable)() { - m.license = value -} -// SetMasterBranch sets the master_branch property value. The master_branch property -func (m *PullRequest_base_repo) SetMasterBranch(value *string)() { - m.master_branch = value -} -// SetMergesUrl sets the merges_url property value. The merges_url property -func (m *PullRequest_base_repo) SetMergesUrl(value *string)() { - m.merges_url = value -} -// SetMilestonesUrl sets the milestones_url property value. The milestones_url property -func (m *PullRequest_base_repo) SetMilestonesUrl(value *string)() { - m.milestones_url = value -} -// SetMirrorUrl sets the mirror_url property value. The mirror_url property -func (m *PullRequest_base_repo) SetMirrorUrl(value *string)() { - m.mirror_url = value -} -// SetName sets the name property value. The name property -func (m *PullRequest_base_repo) SetName(value *string)() { - m.name = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_base_repo) SetNodeId(value *string)() { - m.node_id = value -} -// SetNotificationsUrl sets the notifications_url property value. The notifications_url property -func (m *PullRequest_base_repo) SetNotificationsUrl(value *string)() { - m.notifications_url = value -} -// SetOpenIssues sets the open_issues property value. The open_issues property -func (m *PullRequest_base_repo) SetOpenIssues(value *int32)() { - m.open_issues = value -} -// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property -func (m *PullRequest_base_repo) SetOpenIssuesCount(value *int32)() { - m.open_issues_count = value -} -// SetOwner sets the owner property value. The owner property -func (m *PullRequest_base_repo) SetOwner(value PullRequest_base_repo_ownerable)() { - m.owner = value -} -// SetPermissions sets the permissions property value. The permissions property -func (m *PullRequest_base_repo) SetPermissions(value PullRequest_base_repo_permissionsable)() { - m.permissions = value -} -// SetPrivate sets the private property value. The private property -func (m *PullRequest_base_repo) SetPrivate(value *bool)() { - m.private = value -} -// SetPullsUrl sets the pulls_url property value. The pulls_url property -func (m *PullRequest_base_repo) SetPullsUrl(value *string)() { - m.pulls_url = value -} -// SetPushedAt sets the pushed_at property value. The pushed_at property -func (m *PullRequest_base_repo) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.pushed_at = value -} -// SetReleasesUrl sets the releases_url property value. The releases_url property -func (m *PullRequest_base_repo) SetReleasesUrl(value *string)() { - m.releases_url = value -} -// SetSize sets the size property value. The size property -func (m *PullRequest_base_repo) SetSize(value *int32)() { - m.size = value -} -// SetSshUrl sets the ssh_url property value. The ssh_url property -func (m *PullRequest_base_repo) SetSshUrl(value *string)() { - m.ssh_url = value -} -// SetStargazersCount sets the stargazers_count property value. The stargazers_count property -func (m *PullRequest_base_repo) SetStargazersCount(value *int32)() { - m.stargazers_count = value -} -// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property -func (m *PullRequest_base_repo) SetStargazersUrl(value *string)() { - m.stargazers_url = value -} -// SetStatusesUrl sets the statuses_url property value. The statuses_url property -func (m *PullRequest_base_repo) SetStatusesUrl(value *string)() { - m.statuses_url = value -} -// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property -func (m *PullRequest_base_repo) SetSubscribersUrl(value *string)() { - m.subscribers_url = value -} -// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property -func (m *PullRequest_base_repo) SetSubscriptionUrl(value *string)() { - m.subscription_url = value -} -// SetSvnUrl sets the svn_url property value. The svn_url property -func (m *PullRequest_base_repo) SetSvnUrl(value *string)() { - m.svn_url = value -} -// SetTagsUrl sets the tags_url property value. The tags_url property -func (m *PullRequest_base_repo) SetTagsUrl(value *string)() { - m.tags_url = value -} -// SetTeamsUrl sets the teams_url property value. The teams_url property -func (m *PullRequest_base_repo) SetTeamsUrl(value *string)() { - m.teams_url = value -} -// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property -func (m *PullRequest_base_repo) SetTempCloneToken(value *string)() { - m.temp_clone_token = value -} -// SetTopics sets the topics property value. The topics property -func (m *PullRequest_base_repo) SetTopics(value []string)() { - m.topics = value -} -// SetTreesUrl sets the trees_url property value. The trees_url property -func (m *PullRequest_base_repo) SetTreesUrl(value *string)() { - m.trees_url = value -} -// SetUpdatedAt sets the updated_at property value. The updated_at property -func (m *PullRequest_base_repo) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.updated_at = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_base_repo) SetUrl(value *string)() { - m.url = value -} -// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. -func (m *PullRequest_base_repo) SetVisibility(value *string)() { - m.visibility = value -} -// SetWatchers sets the watchers property value. The watchers property -func (m *PullRequest_base_repo) SetWatchers(value *int32)() { - m.watchers = value -} -// SetWatchersCount sets the watchers_count property value. The watchers_count property -func (m *PullRequest_base_repo) SetWatchersCount(value *int32)() { - m.watchers_count = value -} -// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property -func (m *PullRequest_base_repo) SetWebCommitSignoffRequired(value *bool)() { - m.web_commit_signoff_required = value -} -type PullRequest_base_repoable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAllowForking()(*bool) - GetAllowMergeCommit()(*bool) - GetAllowRebaseMerge()(*bool) - GetAllowSquashMerge()(*bool) - GetArchived()(*bool) - GetArchiveUrl()(*string) - GetAssigneesUrl()(*string) - GetBlobsUrl()(*string) - GetBranchesUrl()(*string) - GetCloneUrl()(*string) - GetCollaboratorsUrl()(*string) - GetCommentsUrl()(*string) - GetCommitsUrl()(*string) - GetCompareUrl()(*string) - GetContentsUrl()(*string) - GetContributorsUrl()(*string) - GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetDefaultBranch()(*string) - GetDeploymentsUrl()(*string) - GetDescription()(*string) - GetDisabled()(*bool) - GetDownloadsUrl()(*string) - GetEventsUrl()(*string) - GetFork()(*bool) - GetForks()(*int32) - GetForksCount()(*int32) - GetForksUrl()(*string) - GetFullName()(*string) - GetGitCommitsUrl()(*string) - GetGitRefsUrl()(*string) - GetGitTagsUrl()(*string) - GetGitUrl()(*string) - GetHasDiscussions()(*bool) - GetHasDownloads()(*bool) - GetHasIssues()(*bool) - GetHasPages()(*bool) - GetHasProjects()(*bool) - GetHasWiki()(*bool) - GetHomepage()(*string) - GetHooksUrl()(*string) - GetHtmlUrl()(*string) - GetId()(*int32) - GetIssueCommentUrl()(*string) - GetIssueEventsUrl()(*string) - GetIssuesUrl()(*string) - GetIsTemplate()(*bool) - GetKeysUrl()(*string) - GetLabelsUrl()(*string) - GetLanguage()(*string) - GetLanguagesUrl()(*string) - GetLicense()(NullableLicenseSimpleable) - GetMasterBranch()(*string) - GetMergesUrl()(*string) - GetMilestonesUrl()(*string) - GetMirrorUrl()(*string) - GetName()(*string) - GetNodeId()(*string) - GetNotificationsUrl()(*string) - GetOpenIssues()(*int32) - GetOpenIssuesCount()(*int32) - GetOwner()(PullRequest_base_repo_ownerable) - GetPermissions()(PullRequest_base_repo_permissionsable) - GetPrivate()(*bool) - GetPullsUrl()(*string) - GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetReleasesUrl()(*string) - GetSize()(*int32) - GetSshUrl()(*string) - GetStargazersCount()(*int32) - GetStargazersUrl()(*string) - GetStatusesUrl()(*string) - GetSubscribersUrl()(*string) - GetSubscriptionUrl()(*string) - GetSvnUrl()(*string) - GetTagsUrl()(*string) - GetTeamsUrl()(*string) - GetTempCloneToken()(*string) - GetTopics()([]string) - GetTreesUrl()(*string) - GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetUrl()(*string) - GetVisibility()(*string) - GetWatchers()(*int32) - GetWatchersCount()(*int32) - GetWebCommitSignoffRequired()(*bool) - SetAllowForking(value *bool)() - SetAllowMergeCommit(value *bool)() - SetAllowRebaseMerge(value *bool)() - SetAllowSquashMerge(value *bool)() - SetArchived(value *bool)() - SetArchiveUrl(value *string)() - SetAssigneesUrl(value *string)() - SetBlobsUrl(value *string)() - SetBranchesUrl(value *string)() - SetCloneUrl(value *string)() - SetCollaboratorsUrl(value *string)() - SetCommentsUrl(value *string)() - SetCommitsUrl(value *string)() - SetCompareUrl(value *string)() - SetContentsUrl(value *string)() - SetContributorsUrl(value *string)() - SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetDefaultBranch(value *string)() - SetDeploymentsUrl(value *string)() - SetDescription(value *string)() - SetDisabled(value *bool)() - SetDownloadsUrl(value *string)() - SetEventsUrl(value *string)() - SetFork(value *bool)() - SetForks(value *int32)() - SetForksCount(value *int32)() - SetForksUrl(value *string)() - SetFullName(value *string)() - SetGitCommitsUrl(value *string)() - SetGitRefsUrl(value *string)() - SetGitTagsUrl(value *string)() - SetGitUrl(value *string)() - SetHasDiscussions(value *bool)() - SetHasDownloads(value *bool)() - SetHasIssues(value *bool)() - SetHasPages(value *bool)() - SetHasProjects(value *bool)() - SetHasWiki(value *bool)() - SetHomepage(value *string)() - SetHooksUrl(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int32)() - SetIssueCommentUrl(value *string)() - SetIssueEventsUrl(value *string)() - SetIssuesUrl(value *string)() - SetIsTemplate(value *bool)() - SetKeysUrl(value *string)() - SetLabelsUrl(value *string)() - SetLanguage(value *string)() - SetLanguagesUrl(value *string)() - SetLicense(value NullableLicenseSimpleable)() - SetMasterBranch(value *string)() - SetMergesUrl(value *string)() - SetMilestonesUrl(value *string)() - SetMirrorUrl(value *string)() - SetName(value *string)() - SetNodeId(value *string)() - SetNotificationsUrl(value *string)() - SetOpenIssues(value *int32)() - SetOpenIssuesCount(value *int32)() - SetOwner(value PullRequest_base_repo_ownerable)() - SetPermissions(value PullRequest_base_repo_permissionsable)() - SetPrivate(value *bool)() - SetPullsUrl(value *string)() - SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetReleasesUrl(value *string)() - SetSize(value *int32)() - SetSshUrl(value *string)() - SetStargazersCount(value *int32)() - SetStargazersUrl(value *string)() - SetStatusesUrl(value *string)() - SetSubscribersUrl(value *string)() - SetSubscriptionUrl(value *string)() - SetSvnUrl(value *string)() - SetTagsUrl(value *string)() - SetTeamsUrl(value *string)() - SetTempCloneToken(value *string)() - SetTopics(value []string)() - SetTreesUrl(value *string)() - SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetUrl(value *string)() - SetVisibility(value *string)() - SetWatchers(value *int32)() - SetWatchersCount(value *int32)() - SetWebCommitSignoffRequired(value *bool)() -} diff --git a/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_owner.go b/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_owner.go deleted file mode 100644 index f899c01c..00000000 --- a/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_owner.go +++ /dev/null @@ -1,602 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_base_repo_owner 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 - // The events_url property - events_url *string - // The followers_url property - followers_url *string - // The following_url property - following_url *string - // The gists_url property - gists_url *string - // The gravatar_id property - gravatar_id *string - // The html_url property - html_url *string - // The id property - id *int32 - // The login property - login *string - // The node_id property - node_id *string - // The organizations_url property - organizations_url *string - // The received_events_url property - received_events_url *string - // The repos_url property - repos_url *string - // The site_admin property - site_admin *bool - // The starred_url property - starred_url *string - // The subscriptions_url property - subscriptions_url *string - // The type property - typeEscaped *string - // The url property - url *string - // The user_view_type property - user_view_type *string -} -// NewPullRequest_base_repo_owner instantiates a new PullRequest_base_repo_owner and sets the default values. -func NewPullRequest_base_repo_owner()(*PullRequest_base_repo_owner) { - m := &PullRequest_base_repo_owner{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_base_repo_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_base_repo_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_base_repo_owner(), 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 *PullRequest_base_repo_owner) 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 *PullRequest_base_repo_owner) GetAvatarUrl()(*string) { - return m.avatar_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) 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 *PullRequest_base_repo_owner) 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["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_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowersUrl(val) - } - return nil - } - res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowingUrl(val) - } - return nil - } - res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGistsUrl(val) - } - return nil - } - res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGravatarId(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["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLogin(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["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOrganizationsUrl(val) - } - return nil - } - res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReceivedEventsUrl(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["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSiteAdmin(val) - } - return nil - } - res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStarredUrl(val) - } - return nil - } - res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionsUrl(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUrl(val) - } - return nil - } - res["user_view_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUserViewType(val) - } - return nil - } - return res -} -// GetFollowersUrl gets the followers_url property value. The followers_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetFollowersUrl()(*string) { - return m.followers_url -} -// GetFollowingUrl gets the following_url property value. The following_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetFollowingUrl()(*string) { - return m.following_url -} -// GetGistsUrl gets the gists_url property value. The gists_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetGistsUrl()(*string) { - return m.gists_url -} -// GetGravatarId gets the gravatar_id property value. The gravatar_id property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetGravatarId()(*string) { - return m.gravatar_id -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequest_base_repo_owner) GetId()(*int32) { - return m.id -} -// GetLogin gets the login property value. The login property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetLogin()(*string) { - return m.login -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetNodeId()(*string) { - return m.node_id -} -// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetOrganizationsUrl()(*string) { - return m.organizations_url -} -// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetReceivedEventsUrl()(*string) { - return m.received_events_url -} -// GetReposUrl gets the repos_url property value. The repos_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetReposUrl()(*string) { - return m.repos_url -} -// GetSiteAdmin gets the site_admin property value. The site_admin property -// returns a *bool when successful -func (m *PullRequest_base_repo_owner) GetSiteAdmin()(*bool) { - return m.site_admin -} -// GetStarredUrl gets the starred_url property value. The starred_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetStarredUrl()(*string) { - return m.starred_url -} -// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetSubscriptionsUrl()(*string) { - return m.subscriptions_url -} -// GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetTypeEscaped()(*string) { - return m.typeEscaped -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetUrl()(*string) { - return m.url -} -// GetUserViewType gets the user_view_type property value. The user_view_type property -// returns a *string when successful -func (m *PullRequest_base_repo_owner) GetUserViewType()(*string) { - return m.user_view_type -} -// Serialize serializes information the current object -func (m *PullRequest_base_repo_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) - 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("login", m.GetLogin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("node_id", m.GetNodeId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("repos_url", m.GetReposUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("url", m.GetUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("user_view_type", m.GetUserViewType()) - 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 *PullRequest_base_repo_owner) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAvatarUrl sets the avatar_url property value. The avatar_url property -func (m *PullRequest_base_repo_owner) SetAvatarUrl(value *string)() { - m.avatar_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_base_repo_owner) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFollowersUrl sets the followers_url property value. The followers_url property -func (m *PullRequest_base_repo_owner) SetFollowersUrl(value *string)() { - m.followers_url = value -} -// SetFollowingUrl sets the following_url property value. The following_url property -func (m *PullRequest_base_repo_owner) SetFollowingUrl(value *string)() { - m.following_url = value -} -// SetGistsUrl sets the gists_url property value. The gists_url property -func (m *PullRequest_base_repo_owner) SetGistsUrl(value *string)() { - m.gists_url = value -} -// SetGravatarId sets the gravatar_id property value. The gravatar_id property -func (m *PullRequest_base_repo_owner) SetGravatarId(value *string)() { - m.gravatar_id = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_base_repo_owner) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_base_repo_owner) SetId(value *int32)() { - m.id = value -} -// SetLogin sets the login property value. The login property -func (m *PullRequest_base_repo_owner) SetLogin(value *string)() { - m.login = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_base_repo_owner) SetNodeId(value *string)() { - m.node_id = value -} -// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property -func (m *PullRequest_base_repo_owner) SetOrganizationsUrl(value *string)() { - m.organizations_url = value -} -// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property -func (m *PullRequest_base_repo_owner) SetReceivedEventsUrl(value *string)() { - m.received_events_url = value -} -// SetReposUrl sets the repos_url property value. The repos_url property -func (m *PullRequest_base_repo_owner) SetReposUrl(value *string)() { - m.repos_url = value -} -// SetSiteAdmin sets the site_admin property value. The site_admin property -func (m *PullRequest_base_repo_owner) SetSiteAdmin(value *bool)() { - m.site_admin = value -} -// SetStarredUrl sets the starred_url property value. The starred_url property -func (m *PullRequest_base_repo_owner) SetStarredUrl(value *string)() { - m.starred_url = value -} -// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property -func (m *PullRequest_base_repo_owner) SetSubscriptionsUrl(value *string)() { - m.subscriptions_url = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *PullRequest_base_repo_owner) SetTypeEscaped(value *string)() { - m.typeEscaped = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_base_repo_owner) SetUrl(value *string)() { - m.url = value -} -// SetUserViewType sets the user_view_type property value. The user_view_type property -func (m *PullRequest_base_repo_owner) SetUserViewType(value *string)() { - m.user_view_type = value -} -type PullRequest_base_repo_ownerable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAvatarUrl()(*string) - GetEventsUrl()(*string) - GetFollowersUrl()(*string) - GetFollowingUrl()(*string) - GetGistsUrl()(*string) - GetGravatarId()(*string) - GetHtmlUrl()(*string) - GetId()(*int32) - GetLogin()(*string) - GetNodeId()(*string) - GetOrganizationsUrl()(*string) - GetReceivedEventsUrl()(*string) - GetReposUrl()(*string) - GetSiteAdmin()(*bool) - GetStarredUrl()(*string) - GetSubscriptionsUrl()(*string) - GetTypeEscaped()(*string) - GetUrl()(*string) - GetUserViewType()(*string) - SetAvatarUrl(value *string)() - SetEventsUrl(value *string)() - SetFollowersUrl(value *string)() - SetFollowingUrl(value *string)() - SetGistsUrl(value *string)() - SetGravatarId(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int32)() - SetLogin(value *string)() - SetNodeId(value *string)() - SetOrganizationsUrl(value *string)() - SetReceivedEventsUrl(value *string)() - SetReposUrl(value *string)() - SetSiteAdmin(value *bool)() - SetStarredUrl(value *string)() - SetSubscriptionsUrl(value *string)() - SetTypeEscaped(value *string)() - SetUrl(value *string)() - SetUserViewType(value *string)() -} diff --git a/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_permissions.go b/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_permissions.go deleted file mode 100644 index 65df8f05..00000000 --- a/pkg/github/models/pull_request_escaped_base_escaped_repo_escaped_permissions.go +++ /dev/null @@ -1,196 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_base_repo_permissions 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 admin property - admin *bool - // The maintain property - maintain *bool - // The pull property - pull *bool - // The push property - push *bool - // The triage property - triage *bool -} -// NewPullRequest_base_repo_permissions instantiates a new PullRequest_base_repo_permissions and sets the default values. -func NewPullRequest_base_repo_permissions()(*PullRequest_base_repo_permissions) { - m := &PullRequest_base_repo_permissions{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_base_repo_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_base_repo_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_base_repo_permissions(), 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 *PullRequest_base_repo_permissions) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAdmin gets the admin property value. The admin property -// returns a *bool when successful -func (m *PullRequest_base_repo_permissions) GetAdmin()(*bool) { - return m.admin -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *PullRequest_base_repo_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAdmin(val) - } - return nil - } - res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetMaintain(val) - } - return nil - } - res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPull(val) - } - return nil - } - res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPush(val) - } - return nil - } - res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetTriage(val) - } - return nil - } - return res -} -// GetMaintain gets the maintain property value. The maintain property -// returns a *bool when successful -func (m *PullRequest_base_repo_permissions) GetMaintain()(*bool) { - return m.maintain -} -// GetPull gets the pull property value. The pull property -// returns a *bool when successful -func (m *PullRequest_base_repo_permissions) GetPull()(*bool) { - return m.pull -} -// GetPush gets the push property value. The push property -// returns a *bool when successful -func (m *PullRequest_base_repo_permissions) GetPush()(*bool) { - return m.push -} -// GetTriage gets the triage property value. The triage property -// returns a *bool when successful -func (m *PullRequest_base_repo_permissions) GetTriage()(*bool) { - return m.triage -} -// Serialize serializes information the current object -func (m *PullRequest_base_repo_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("admin", m.GetAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("maintain", m.GetMaintain()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("pull", m.GetPull()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("push", m.GetPush()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("triage", m.GetTriage()) - 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 *PullRequest_base_repo_permissions) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAdmin sets the admin property value. The admin property -func (m *PullRequest_base_repo_permissions) SetAdmin(value *bool)() { - m.admin = value -} -// SetMaintain sets the maintain property value. The maintain property -func (m *PullRequest_base_repo_permissions) SetMaintain(value *bool)() { - m.maintain = value -} -// SetPull sets the pull property value. The pull property -func (m *PullRequest_base_repo_permissions) SetPull(value *bool)() { - m.pull = value -} -// SetPush sets the push property value. The push property -func (m *PullRequest_base_repo_permissions) SetPush(value *bool)() { - m.push = value -} -// SetTriage sets the triage property value. The triage property -func (m *PullRequest_base_repo_permissions) SetTriage(value *bool)() { - m.triage = value -} -type PullRequest_base_repo_permissionsable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAdmin()(*bool) - GetMaintain()(*bool) - GetPull()(*bool) - GetPush()(*bool) - GetTriage()(*bool) - SetAdmin(value *bool)() - SetMaintain(value *bool)() - SetPull(value *bool)() - SetPush(value *bool)() - SetTriage(value *bool)() -} diff --git a/pkg/github/models/pull_request_escaped_base_escaped_user.go b/pkg/github/models/pull_request_escaped_base_escaped_user.go deleted file mode 100644 index f2119c6e..00000000 --- a/pkg/github/models/pull_request_escaped_base_escaped_user.go +++ /dev/null @@ -1,602 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_base_user 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 - // The events_url property - events_url *string - // The followers_url property - followers_url *string - // The following_url property - following_url *string - // The gists_url property - gists_url *string - // The gravatar_id property - gravatar_id *string - // The html_url property - html_url *string - // The id property - id *int64 - // The login property - login *string - // The node_id property - node_id *string - // The organizations_url property - organizations_url *string - // The received_events_url property - received_events_url *string - // The repos_url property - repos_url *string - // The site_admin property - site_admin *bool - // The starred_url property - starred_url *string - // The subscriptions_url property - subscriptions_url *string - // The type property - typeEscaped *string - // The url property - url *string - // The user_view_type property - user_view_type *string -} -// NewPullRequest_base_user instantiates a new PullRequest_base_user and sets the default values. -func NewPullRequest_base_user()(*PullRequest_base_user) { - m := &PullRequest_base_user{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_base_userFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_base_userFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_base_user(), 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 *PullRequest_base_user) 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 *PullRequest_base_user) GetAvatarUrl()(*string) { - return m.avatar_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_base_user) 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 *PullRequest_base_user) 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["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_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowersUrl(val) - } - return nil - } - res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowingUrl(val) - } - return nil - } - res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGistsUrl(val) - } - return nil - } - res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGravatarId(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.GetInt64Value() - if err != nil { - return err - } - if val != nil { - m.SetId(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["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["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOrganizationsUrl(val) - } - return nil - } - res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReceivedEventsUrl(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["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSiteAdmin(val) - } - return nil - } - res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStarredUrl(val) - } - return nil - } - res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionsUrl(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUrl(val) - } - return nil - } - res["user_view_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUserViewType(val) - } - return nil - } - return res -} -// GetFollowersUrl gets the followers_url property value. The followers_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetFollowersUrl()(*string) { - return m.followers_url -} -// GetFollowingUrl gets the following_url property value. The following_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetFollowingUrl()(*string) { - return m.following_url -} -// GetGistsUrl gets the gists_url property value. The gists_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetGistsUrl()(*string) { - return m.gists_url -} -// GetGravatarId gets the gravatar_id property value. The gravatar_id property -// returns a *string when successful -func (m *PullRequest_base_user) GetGravatarId()(*string) { - return m.gravatar_id -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int64 when successful -func (m *PullRequest_base_user) GetId()(*int64) { - return m.id -} -// GetLogin gets the login property value. The login property -// returns a *string when successful -func (m *PullRequest_base_user) GetLogin()(*string) { - return m.login -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_base_user) GetNodeId()(*string) { - return m.node_id -} -// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetOrganizationsUrl()(*string) { - return m.organizations_url -} -// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetReceivedEventsUrl()(*string) { - return m.received_events_url -} -// GetReposUrl gets the repos_url property value. The repos_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetReposUrl()(*string) { - return m.repos_url -} -// GetSiteAdmin gets the site_admin property value. The site_admin property -// returns a *bool when successful -func (m *PullRequest_base_user) GetSiteAdmin()(*bool) { - return m.site_admin -} -// GetStarredUrl gets the starred_url property value. The starred_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetStarredUrl()(*string) { - return m.starred_url -} -// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property -// returns a *string when successful -func (m *PullRequest_base_user) GetSubscriptionsUrl()(*string) { - return m.subscriptions_url -} -// GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *PullRequest_base_user) GetTypeEscaped()(*string) { - return m.typeEscaped -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_base_user) GetUrl()(*string) { - return m.url -} -// GetUserViewType gets the user_view_type property value. The user_view_type property -// returns a *string when successful -func (m *PullRequest_base_user) GetUserViewType()(*string) { - return m.user_view_type -} -// Serialize serializes information the current object -func (m *PullRequest_base_user) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt64Value("id", m.GetId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("login", m.GetLogin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("node_id", m.GetNodeId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("repos_url", m.GetReposUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("url", m.GetUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("user_view_type", m.GetUserViewType()) - 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 *PullRequest_base_user) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAvatarUrl sets the avatar_url property value. The avatar_url property -func (m *PullRequest_base_user) SetAvatarUrl(value *string)() { - m.avatar_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_base_user) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFollowersUrl sets the followers_url property value. The followers_url property -func (m *PullRequest_base_user) SetFollowersUrl(value *string)() { - m.followers_url = value -} -// SetFollowingUrl sets the following_url property value. The following_url property -func (m *PullRequest_base_user) SetFollowingUrl(value *string)() { - m.following_url = value -} -// SetGistsUrl sets the gists_url property value. The gists_url property -func (m *PullRequest_base_user) SetGistsUrl(value *string)() { - m.gists_url = value -} -// SetGravatarId sets the gravatar_id property value. The gravatar_id property -func (m *PullRequest_base_user) SetGravatarId(value *string)() { - m.gravatar_id = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_base_user) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_base_user) SetId(value *int64)() { - m.id = value -} -// SetLogin sets the login property value. The login property -func (m *PullRequest_base_user) SetLogin(value *string)() { - m.login = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_base_user) SetNodeId(value *string)() { - m.node_id = value -} -// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property -func (m *PullRequest_base_user) SetOrganizationsUrl(value *string)() { - m.organizations_url = value -} -// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property -func (m *PullRequest_base_user) SetReceivedEventsUrl(value *string)() { - m.received_events_url = value -} -// SetReposUrl sets the repos_url property value. The repos_url property -func (m *PullRequest_base_user) SetReposUrl(value *string)() { - m.repos_url = value -} -// SetSiteAdmin sets the site_admin property value. The site_admin property -func (m *PullRequest_base_user) SetSiteAdmin(value *bool)() { - m.site_admin = value -} -// SetStarredUrl sets the starred_url property value. The starred_url property -func (m *PullRequest_base_user) SetStarredUrl(value *string)() { - m.starred_url = value -} -// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property -func (m *PullRequest_base_user) SetSubscriptionsUrl(value *string)() { - m.subscriptions_url = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *PullRequest_base_user) SetTypeEscaped(value *string)() { - m.typeEscaped = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_base_user) SetUrl(value *string)() { - m.url = value -} -// SetUserViewType sets the user_view_type property value. The user_view_type property -func (m *PullRequest_base_user) SetUserViewType(value *string)() { - m.user_view_type = value -} -type PullRequest_base_userable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAvatarUrl()(*string) - GetEventsUrl()(*string) - GetFollowersUrl()(*string) - GetFollowingUrl()(*string) - GetGistsUrl()(*string) - GetGravatarId()(*string) - GetHtmlUrl()(*string) - GetId()(*int64) - GetLogin()(*string) - GetNodeId()(*string) - GetOrganizationsUrl()(*string) - GetReceivedEventsUrl()(*string) - GetReposUrl()(*string) - GetSiteAdmin()(*bool) - GetStarredUrl()(*string) - GetSubscriptionsUrl()(*string) - GetTypeEscaped()(*string) - GetUrl()(*string) - GetUserViewType()(*string) - SetAvatarUrl(value *string)() - SetEventsUrl(value *string)() - SetFollowersUrl(value *string)() - SetFollowingUrl(value *string)() - SetGistsUrl(value *string)() - SetGravatarId(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int64)() - SetLogin(value *string)() - SetNodeId(value *string)() - SetOrganizationsUrl(value *string)() - SetReceivedEventsUrl(value *string)() - SetReposUrl(value *string)() - SetSiteAdmin(value *bool)() - SetStarredUrl(value *string)() - SetSubscriptionsUrl(value *string)() - SetTypeEscaped(value *string)() - SetUrl(value *string)() - SetUserViewType(value *string)() -} diff --git a/pkg/github/models/pull_request_escaped_head.go b/pkg/github/models/pull_request_escaped_head.go index b5a049bd..867020c5 100644 --- a/pkg/github/models/pull_request_escaped_head.go +++ b/pkg/github/models/pull_request_escaped_head.go @@ -11,12 +11,12 @@ type PullRequest_head struct { label *string // The ref property ref *string - // The repo property - repo PullRequest_head_repoable + // A repository on GitHub. + repo Repositoryable // The sha property sha *string - // The user property - user PullRequest_head_userable + // A GitHub user. + user SimpleUserable } // NewPullRequest_head instantiates a new PullRequest_head and sets the default values. func NewPullRequest_head()(*PullRequest_head) { @@ -60,12 +60,12 @@ func (m *PullRequest_head) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_head_repoFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateRepositoryFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetRepo(val.(PullRequest_head_repoable)) + m.SetRepo(val.(Repositoryable)) } return nil } @@ -80,12 +80,12 @@ func (m *PullRequest_head) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_head_userFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetUser(val.(PullRequest_head_userable)) + m.SetUser(val.(SimpleUserable)) } return nil } @@ -101,9 +101,9 @@ func (m *PullRequest_head) GetLabel()(*string) { func (m *PullRequest_head) GetRef()(*string) { return m.ref } -// GetRepo gets the repo property value. The repo property -// returns a PullRequest_head_repoable when successful -func (m *PullRequest_head) GetRepo()(PullRequest_head_repoable) { +// GetRepo gets the repo property value. A repository on GitHub. +// returns a Repositoryable when successful +func (m *PullRequest_head) GetRepo()(Repositoryable) { return m.repo } // GetSha gets the sha property value. The sha property @@ -111,9 +111,9 @@ func (m *PullRequest_head) GetRepo()(PullRequest_head_repoable) { func (m *PullRequest_head) GetSha()(*string) { return m.sha } -// GetUser gets the user property value. The user property -// returns a PullRequest_head_userable when successful -func (m *PullRequest_head) GetUser()(PullRequest_head_userable) { +// GetUser gets the user property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *PullRequest_head) GetUser()(SimpleUserable) { return m.user } // Serialize serializes information the current object @@ -168,16 +168,16 @@ func (m *PullRequest_head) SetLabel(value *string)() { func (m *PullRequest_head) SetRef(value *string)() { m.ref = value } -// SetRepo sets the repo property value. The repo property -func (m *PullRequest_head) SetRepo(value PullRequest_head_repoable)() { +// SetRepo sets the repo property value. A repository on GitHub. +func (m *PullRequest_head) SetRepo(value Repositoryable)() { m.repo = value } // SetSha sets the sha property value. The sha property func (m *PullRequest_head) SetSha(value *string)() { m.sha = value } -// SetUser sets the user property value. The user property -func (m *PullRequest_head) SetUser(value PullRequest_head_userable)() { +// SetUser sets the user property value. A GitHub user. +func (m *PullRequest_head) SetUser(value SimpleUserable)() { m.user = value } type PullRequest_headable interface { @@ -185,12 +185,12 @@ type PullRequest_headable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetLabel()(*string) GetRef()(*string) - GetRepo()(PullRequest_head_repoable) + GetRepo()(Repositoryable) GetSha()(*string) - GetUser()(PullRequest_head_userable) + GetUser()(SimpleUserable) SetLabel(value *string)() SetRef(value *string)() - SetRepo(value PullRequest_head_repoable)() + SetRepo(value Repositoryable)() SetSha(value *string)() - SetUser(value PullRequest_head_userable)() + SetUser(value SimpleUserable)() } diff --git a/pkg/github/models/pull_request_escaped_head_escaped_repo.go b/pkg/github/models/pull_request_escaped_head_escaped_repo.go deleted file mode 100644 index 6a6fe9ad..00000000 --- a/pkg/github/models/pull_request_escaped_head_escaped_repo.go +++ /dev/null @@ -1,2523 +0,0 @@ -package models - -import ( - i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_head_repo 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 allow_forking property - allow_forking *bool - // The allow_merge_commit property - allow_merge_commit *bool - // The allow_rebase_merge property - allow_rebase_merge *bool - // The allow_squash_merge property - allow_squash_merge *bool - // The archive_url property - archive_url *string - // The archived property - archived *bool - // The assignees_url property - assignees_url *string - // The blobs_url property - blobs_url *string - // The branches_url property - branches_url *string - // The clone_url property - clone_url *string - // The collaborators_url property - collaborators_url *string - // The comments_url property - comments_url *string - // The commits_url property - commits_url *string - // The compare_url property - compare_url *string - // The contents_url property - contents_url *string - // The contributors_url property - contributors_url *string - // The created_at property - created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The default_branch property - default_branch *string - // The deployments_url property - deployments_url *string - // The description property - description *string - // The disabled property - disabled *bool - // The downloads_url property - downloads_url *string - // The events_url property - events_url *string - // The fork property - fork *bool - // The forks property - forks *int32 - // The forks_count property - forks_count *int32 - // The forks_url property - forks_url *string - // The full_name property - full_name *string - // The git_commits_url property - git_commits_url *string - // The git_refs_url property - git_refs_url *string - // The git_tags_url property - git_tags_url *string - // The git_url property - git_url *string - // The has_discussions property - has_discussions *bool - // The has_downloads property - has_downloads *bool - // The has_issues property - has_issues *bool - // The has_pages property - has_pages *bool - // The has_projects property - has_projects *bool - // The has_wiki property - has_wiki *bool - // The homepage property - homepage *string - // The hooks_url property - hooks_url *string - // The html_url property - html_url *string - // The id property - id *int32 - // The is_template property - is_template *bool - // The issue_comment_url property - issue_comment_url *string - // The issue_events_url property - issue_events_url *string - // The issues_url property - issues_url *string - // The keys_url property - keys_url *string - // The labels_url property - labels_url *string - // The language property - language *string - // The languages_url property - languages_url *string - // The license property - license PullRequest_head_repo_licenseable - // The master_branch property - master_branch *string - // The merges_url property - merges_url *string - // The milestones_url property - milestones_url *string - // The mirror_url property - mirror_url *string - // The name property - name *string - // The node_id property - node_id *string - // The notifications_url property - notifications_url *string - // The open_issues property - open_issues *int32 - // The open_issues_count property - open_issues_count *int32 - // The owner property - owner PullRequest_head_repo_ownerable - // The permissions property - permissions PullRequest_head_repo_permissionsable - // The private property - private *bool - // The pulls_url property - pulls_url *string - // The pushed_at property - pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The releases_url property - releases_url *string - // The size property - size *int32 - // The ssh_url property - ssh_url *string - // The stargazers_count property - stargazers_count *int32 - // The stargazers_url property - stargazers_url *string - // The statuses_url property - statuses_url *string - // The subscribers_url property - subscribers_url *string - // The subscription_url property - subscription_url *string - // The svn_url property - svn_url *string - // The tags_url property - tags_url *string - // The teams_url property - teams_url *string - // The temp_clone_token property - temp_clone_token *string - // The topics property - topics []string - // The trees_url property - trees_url *string - // The updated_at property - updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The url property - url *string - // The repository visibility: public, private, or internal. - visibility *string - // The watchers property - watchers *int32 - // The watchers_count property - watchers_count *int32 - // The web_commit_signoff_required property - web_commit_signoff_required *bool -} -// NewPullRequest_head_repo instantiates a new PullRequest_head_repo and sets the default values. -func NewPullRequest_head_repo()(*PullRequest_head_repo) { - m := &PullRequest_head_repo{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_head_repoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_head_repoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_head_repo(), 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 *PullRequest_head_repo) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAllowForking gets the allow_forking property value. The allow_forking property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetAllowForking()(*bool) { - return m.allow_forking -} -// GetAllowMergeCommit gets the allow_merge_commit property value. The allow_merge_commit property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetAllowMergeCommit()(*bool) { - return m.allow_merge_commit -} -// GetAllowRebaseMerge gets the allow_rebase_merge property value. The allow_rebase_merge property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetAllowRebaseMerge()(*bool) { - return m.allow_rebase_merge -} -// GetAllowSquashMerge gets the allow_squash_merge property value. The allow_squash_merge property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetAllowSquashMerge()(*bool) { - return m.allow_squash_merge -} -// GetArchived gets the archived property value. The archived property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetArchived()(*bool) { - return m.archived -} -// GetArchiveUrl gets the archive_url property value. The archive_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetArchiveUrl()(*string) { - return m.archive_url -} -// GetAssigneesUrl gets the assignees_url property value. The assignees_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetAssigneesUrl()(*string) { - return m.assignees_url -} -// GetBlobsUrl gets the blobs_url property value. The blobs_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetBlobsUrl()(*string) { - return m.blobs_url -} -// GetBranchesUrl gets the branches_url property value. The branches_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetBranchesUrl()(*string) { - return m.branches_url -} -// GetCloneUrl gets the clone_url property value. The clone_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetCloneUrl()(*string) { - return m.clone_url -} -// GetCollaboratorsUrl gets the collaborators_url property value. The collaborators_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetCollaboratorsUrl()(*string) { - return m.collaborators_url -} -// GetCommentsUrl gets the comments_url property value. The comments_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetCommentsUrl()(*string) { - return m.comments_url -} -// GetCommitsUrl gets the commits_url property value. The commits_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetCommitsUrl()(*string) { - return m.commits_url -} -// GetCompareUrl gets the compare_url property value. The compare_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetCompareUrl()(*string) { - return m.compare_url -} -// GetContentsUrl gets the contents_url property value. The contents_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetContentsUrl()(*string) { - return m.contents_url -} -// GetContributorsUrl gets the contributors_url property value. The contributors_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetContributorsUrl()(*string) { - return m.contributors_url -} -// GetCreatedAt gets the created_at property value. The created_at property -// returns a *Time when successful -func (m *PullRequest_head_repo) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.created_at -} -// GetDefaultBranch gets the default_branch property value. The default_branch property -// returns a *string when successful -func (m *PullRequest_head_repo) GetDefaultBranch()(*string) { - return m.default_branch -} -// GetDeploymentsUrl gets the deployments_url property value. The deployments_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetDeploymentsUrl()(*string) { - return m.deployments_url -} -// GetDescription gets the description property value. The description property -// returns a *string when successful -func (m *PullRequest_head_repo) GetDescription()(*string) { - return m.description -} -// GetDisabled gets the disabled property value. The disabled property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetDisabled()(*bool) { - return m.disabled -} -// GetDownloadsUrl gets the downloads_url property value. The downloads_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetDownloadsUrl()(*string) { - return m.downloads_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_head_repo) 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 *PullRequest_head_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowForking(val) - } - return nil - } - res["allow_merge_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowMergeCommit(val) - } - return nil - } - res["allow_rebase_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowRebaseMerge(val) - } - return nil - } - res["allow_squash_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAllowSquashMerge(val) - } - return nil - } - res["archive_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetArchiveUrl(val) - } - return nil - } - res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetArchived(val) - } - return nil - } - res["assignees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetAssigneesUrl(val) - } - return nil - } - res["blobs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetBlobsUrl(val) - } - return nil - } - res["branches_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetBranchesUrl(val) - } - return nil - } - res["clone_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCloneUrl(val) - } - return nil - } - res["collaborators_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCollaboratorsUrl(val) - } - return nil - } - res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCommentsUrl(val) - } - return nil - } - res["commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCommitsUrl(val) - } - return nil - } - res["compare_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCompareUrl(val) - } - return nil - } - res["contents_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetContentsUrl(val) - } - return nil - } - res["contributors_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetContributorsUrl(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["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDefaultBranch(val) - } - return nil - } - res["deployments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDeploymentsUrl(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["disabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetDisabled(val) - } - return nil - } - res["downloads_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDownloadsUrl(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["fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetFork(val) - } - return nil - } - res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetForks(val) - } - return nil - } - res["forks_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetForksCount(val) - } - return nil - } - res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetForksUrl(val) - } - return nil - } - res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFullName(val) - } - return nil - } - res["git_commits_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitCommitsUrl(val) - } - return nil - } - res["git_refs_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitRefsUrl(val) - } - return nil - } - res["git_tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitTagsUrl(val) - } - return nil - } - res["git_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGitUrl(val) - } - return nil - } - res["has_discussions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasDiscussions(val) - } - return nil - } - res["has_downloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasDownloads(val) - } - return nil - } - res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasIssues(val) - } - return nil - } - res["has_pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasPages(val) - } - return nil - } - res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasProjects(val) - } - return nil - } - res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetHasWiki(val) - } - return nil - } - res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetHomepage(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_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetIsTemplate(val) - } - return nil - } - res["issue_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIssueCommentUrl(val) - } - return nil - } - res["issue_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIssueEventsUrl(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["keys_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKeysUrl(val) - } - return nil - } - res["labels_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLabelsUrl(val) - } - return nil - } - res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLanguage(val) - } - return nil - } - res["languages_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLanguagesUrl(val) - } - return nil - } - res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_head_repo_licenseFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetLicense(val.(PullRequest_head_repo_licenseable)) - } - return nil - } - res["master_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMasterBranch(val) - } - return nil - } - res["merges_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMergesUrl(val) - } - return nil - } - res["milestones_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMilestonesUrl(val) - } - return nil - } - res["mirror_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMirrorUrl(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["notifications_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetNotificationsUrl(val) - } - return nil - } - res["open_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetOpenIssues(val) - } - return nil - } - res["open_issues_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetOpenIssuesCount(val) - } - return nil - } - res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_head_repo_ownerFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetOwner(val.(PullRequest_head_repo_ownerable)) - } - return nil - } - res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreatePullRequest_head_repo_permissionsFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetPermissions(val.(PullRequest_head_repo_permissionsable)) - } - return nil - } - res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPrivate(val) - } - return nil - } - res["pulls_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPullsUrl(val) - } - return nil - } - res["pushed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetTimeValue() - if err != nil { - return err - } - if val != nil { - m.SetPushedAt(val) - } - return nil - } - res["releases_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReleasesUrl(val) - } - return nil - } - res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetSize(val) - } - return nil - } - res["ssh_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSshUrl(val) - } - return nil - } - res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetStargazersCount(val) - } - return nil - } - res["stargazers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStargazersUrl(val) - } - return nil - } - res["statuses_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStatusesUrl(val) - } - return nil - } - res["subscribers_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscribersUrl(val) - } - return nil - } - res["subscription_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionUrl(val) - } - return nil - } - res["svn_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSvnUrl(val) - } - return nil - } - res["tags_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTagsUrl(val) - } - return nil - } - res["teams_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTeamsUrl(val) - } - return nil - } - res["temp_clone_token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTempCloneToken(val) - } - return nil - } - res["topics"] = 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.SetTopics(res) - } - return nil - } - res["trees_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTreesUrl(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 - } - res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetVisibility(val) - } - return nil - } - res["watchers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetWatchers(val) - } - return nil - } - res["watchers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetWatchersCount(val) - } - return nil - } - res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetWebCommitSignoffRequired(val) - } - return nil - } - return res -} -// GetFork gets the fork property value. The fork property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetFork()(*bool) { - return m.fork -} -// GetForks gets the forks property value. The forks property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetForks()(*int32) { - return m.forks -} -// GetForksCount gets the forks_count property value. The forks_count property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetForksCount()(*int32) { - return m.forks_count -} -// GetForksUrl gets the forks_url property value. The forks_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetForksUrl()(*string) { - return m.forks_url -} -// GetFullName gets the full_name property value. The full_name property -// returns a *string when successful -func (m *PullRequest_head_repo) GetFullName()(*string) { - return m.full_name -} -// GetGitCommitsUrl gets the git_commits_url property value. The git_commits_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetGitCommitsUrl()(*string) { - return m.git_commits_url -} -// GetGitRefsUrl gets the git_refs_url property value. The git_refs_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetGitRefsUrl()(*string) { - return m.git_refs_url -} -// GetGitTagsUrl gets the git_tags_url property value. The git_tags_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetGitTagsUrl()(*string) { - return m.git_tags_url -} -// GetGitUrl gets the git_url property value. The git_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetGitUrl()(*string) { - return m.git_url -} -// GetHasDiscussions gets the has_discussions property value. The has_discussions property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasDiscussions()(*bool) { - return m.has_discussions -} -// GetHasDownloads gets the has_downloads property value. The has_downloads property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasDownloads()(*bool) { - return m.has_downloads -} -// GetHasIssues gets the has_issues property value. The has_issues property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasIssues()(*bool) { - return m.has_issues -} -// GetHasPages gets the has_pages property value. The has_pages property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasPages()(*bool) { - return m.has_pages -} -// GetHasProjects gets the has_projects property value. The has_projects property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasProjects()(*bool) { - return m.has_projects -} -// GetHasWiki gets the has_wiki property value. The has_wiki property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetHasWiki()(*bool) { - return m.has_wiki -} -// GetHomepage gets the homepage property value. The homepage property -// returns a *string when successful -func (m *PullRequest_head_repo) GetHomepage()(*string) { - return m.homepage -} -// GetHooksUrl gets the hooks_url property value. The hooks_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetHooksUrl()(*string) { - return m.hooks_url -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetId()(*int32) { - return m.id -} -// GetIssueCommentUrl gets the issue_comment_url property value. The issue_comment_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetIssueCommentUrl()(*string) { - return m.issue_comment_url -} -// GetIssueEventsUrl gets the issue_events_url property value. The issue_events_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetIssueEventsUrl()(*string) { - return m.issue_events_url -} -// GetIssuesUrl gets the issues_url property value. The issues_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetIssuesUrl()(*string) { - return m.issues_url -} -// GetIsTemplate gets the is_template property value. The is_template property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetIsTemplate()(*bool) { - return m.is_template -} -// GetKeysUrl gets the keys_url property value. The keys_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetKeysUrl()(*string) { - return m.keys_url -} -// GetLabelsUrl gets the labels_url property value. The labels_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetLabelsUrl()(*string) { - return m.labels_url -} -// GetLanguage gets the language property value. The language property -// returns a *string when successful -func (m *PullRequest_head_repo) GetLanguage()(*string) { - return m.language -} -// GetLanguagesUrl gets the languages_url property value. The languages_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetLanguagesUrl()(*string) { - return m.languages_url -} -// GetLicense gets the license property value. The license property -// returns a PullRequest_head_repo_licenseable when successful -func (m *PullRequest_head_repo) GetLicense()(PullRequest_head_repo_licenseable) { - return m.license -} -// GetMasterBranch gets the master_branch property value. The master_branch property -// returns a *string when successful -func (m *PullRequest_head_repo) GetMasterBranch()(*string) { - return m.master_branch -} -// GetMergesUrl gets the merges_url property value. The merges_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetMergesUrl()(*string) { - return m.merges_url -} -// GetMilestonesUrl gets the milestones_url property value. The milestones_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetMilestonesUrl()(*string) { - return m.milestones_url -} -// GetMirrorUrl gets the mirror_url property value. The mirror_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetMirrorUrl()(*string) { - return m.mirror_url -} -// GetName gets the name property value. The name property -// returns a *string when successful -func (m *PullRequest_head_repo) GetName()(*string) { - return m.name -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_head_repo) GetNodeId()(*string) { - return m.node_id -} -// GetNotificationsUrl gets the notifications_url property value. The notifications_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetNotificationsUrl()(*string) { - return m.notifications_url -} -// GetOpenIssues gets the open_issues property value. The open_issues property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetOpenIssues()(*int32) { - return m.open_issues -} -// GetOpenIssuesCount gets the open_issues_count property value. The open_issues_count property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetOpenIssuesCount()(*int32) { - return m.open_issues_count -} -// GetOwner gets the owner property value. The owner property -// returns a PullRequest_head_repo_ownerable when successful -func (m *PullRequest_head_repo) GetOwner()(PullRequest_head_repo_ownerable) { - return m.owner -} -// GetPermissions gets the permissions property value. The permissions property -// returns a PullRequest_head_repo_permissionsable when successful -func (m *PullRequest_head_repo) GetPermissions()(PullRequest_head_repo_permissionsable) { - return m.permissions -} -// GetPrivate gets the private property value. The private property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetPrivate()(*bool) { - return m.private -} -// GetPullsUrl gets the pulls_url property value. The pulls_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetPullsUrl()(*string) { - return m.pulls_url -} -// GetPushedAt gets the pushed_at property value. The pushed_at property -// returns a *Time when successful -func (m *PullRequest_head_repo) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.pushed_at -} -// GetReleasesUrl gets the releases_url property value. The releases_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetReleasesUrl()(*string) { - return m.releases_url -} -// GetSize gets the size property value. The size property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetSize()(*int32) { - return m.size -} -// GetSshUrl gets the ssh_url property value. The ssh_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetSshUrl()(*string) { - return m.ssh_url -} -// GetStargazersCount gets the stargazers_count property value. The stargazers_count property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetStargazersCount()(*int32) { - return m.stargazers_count -} -// GetStargazersUrl gets the stargazers_url property value. The stargazers_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetStargazersUrl()(*string) { - return m.stargazers_url -} -// GetStatusesUrl gets the statuses_url property value. The statuses_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetStatusesUrl()(*string) { - return m.statuses_url -} -// GetSubscribersUrl gets the subscribers_url property value. The subscribers_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetSubscribersUrl()(*string) { - return m.subscribers_url -} -// GetSubscriptionUrl gets the subscription_url property value. The subscription_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetSubscriptionUrl()(*string) { - return m.subscription_url -} -// GetSvnUrl gets the svn_url property value. The svn_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetSvnUrl()(*string) { - return m.svn_url -} -// GetTagsUrl gets the tags_url property value. The tags_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetTagsUrl()(*string) { - return m.tags_url -} -// GetTeamsUrl gets the teams_url property value. The teams_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetTeamsUrl()(*string) { - return m.teams_url -} -// GetTempCloneToken gets the temp_clone_token property value. The temp_clone_token property -// returns a *string when successful -func (m *PullRequest_head_repo) GetTempCloneToken()(*string) { - return m.temp_clone_token -} -// GetTopics gets the topics property value. The topics property -// returns a []string when successful -func (m *PullRequest_head_repo) GetTopics()([]string) { - return m.topics -} -// GetTreesUrl gets the trees_url property value. The trees_url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetTreesUrl()(*string) { - return m.trees_url -} -// GetUpdatedAt gets the updated_at property value. The updated_at property -// returns a *Time when successful -func (m *PullRequest_head_repo) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { - return m.updated_at -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_head_repo) GetUrl()(*string) { - return m.url -} -// GetVisibility gets the visibility property value. The repository visibility: public, private, or internal. -// returns a *string when successful -func (m *PullRequest_head_repo) GetVisibility()(*string) { - return m.visibility -} -// GetWatchers gets the watchers property value. The watchers property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetWatchers()(*int32) { - return m.watchers -} -// GetWatchersCount gets the watchers_count property value. The watchers_count property -// returns a *int32 when successful -func (m *PullRequest_head_repo) GetWatchersCount()(*int32) { - return m.watchers_count -} -// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. The web_commit_signoff_required property -// returns a *bool when successful -func (m *PullRequest_head_repo) GetWebCommitSignoffRequired()(*bool) { - return m.web_commit_signoff_required -} -// Serialize serializes information the current object -func (m *PullRequest_head_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_merge_commit", m.GetAllowMergeCommit()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_rebase_merge", m.GetAllowRebaseMerge()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("allow_squash_merge", m.GetAllowSquashMerge()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("archived", m.GetArchived()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("archive_url", m.GetArchiveUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("assignees_url", m.GetAssigneesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("blobs_url", m.GetBlobsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("branches_url", m.GetBranchesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("clone_url", m.GetCloneUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("collaborators_url", m.GetCollaboratorsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("commits_url", m.GetCommitsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("compare_url", m.GetCompareUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("contents_url", m.GetContentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("contributors_url", m.GetContributorsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("deployments_url", m.GetDeploymentsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("description", m.GetDescription()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("disabled", m.GetDisabled()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("downloads_url", m.GetDownloadsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("fork", m.GetFork()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("forks", m.GetForks()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("forks_count", m.GetForksCount()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("forks_url", m.GetForksUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("full_name", m.GetFullName()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_commits_url", m.GetGitCommitsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_refs_url", m.GetGitRefsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_tags_url", m.GetGitTagsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("git_url", m.GetGitUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_discussions", m.GetHasDiscussions()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_downloads", m.GetHasDownloads()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_pages", m.GetHasPages()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("homepage", m.GetHomepage()) - 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.WriteStringValue("issue_comment_url", m.GetIssueCommentUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("issue_events_url", m.GetIssueEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("keys_url", m.GetKeysUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("labels_url", m.GetLabelsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("language", m.GetLanguage()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("languages_url", m.GetLanguagesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("license", m.GetLicense()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("master_branch", m.GetMasterBranch()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("merges_url", m.GetMergesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("milestones_url", m.GetMilestonesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("mirror_url", m.GetMirrorUrl()) - 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.WriteStringValue("notifications_url", m.GetNotificationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("open_issues", m.GetOpenIssues()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("open_issues_count", m.GetOpenIssuesCount()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("owner", m.GetOwner()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("permissions", m.GetPermissions()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("private", m.GetPrivate()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("pulls_url", m.GetPullsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteTimeValue("pushed_at", m.GetPushedAt()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("releases_url", m.GetReleasesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("size", m.GetSize()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("ssh_url", m.GetSshUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("stargazers_url", m.GetStargazersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("statuses_url", m.GetStatusesUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscribers_url", m.GetSubscribersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscription_url", m.GetSubscriptionUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("svn_url", m.GetSvnUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("tags_url", m.GetTagsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("teams_url", m.GetTeamsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("temp_clone_token", m.GetTempCloneToken()) - if err != nil { - return err - } - } - if m.GetTopics() != nil { - err := writer.WriteCollectionOfStringValues("topics", m.GetTopics()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("trees_url", m.GetTreesUrl()) - 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.WriteStringValue("visibility", m.GetVisibility()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("watchers", m.GetWatchers()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("watchers_count", m.GetWatchersCount()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) - 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 *PullRequest_head_repo) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAllowForking sets the allow_forking property value. The allow_forking property -func (m *PullRequest_head_repo) SetAllowForking(value *bool)() { - m.allow_forking = value -} -// SetAllowMergeCommit sets the allow_merge_commit property value. The allow_merge_commit property -func (m *PullRequest_head_repo) SetAllowMergeCommit(value *bool)() { - m.allow_merge_commit = value -} -// SetAllowRebaseMerge sets the allow_rebase_merge property value. The allow_rebase_merge property -func (m *PullRequest_head_repo) SetAllowRebaseMerge(value *bool)() { - m.allow_rebase_merge = value -} -// SetAllowSquashMerge sets the allow_squash_merge property value. The allow_squash_merge property -func (m *PullRequest_head_repo) SetAllowSquashMerge(value *bool)() { - m.allow_squash_merge = value -} -// SetArchived sets the archived property value. The archived property -func (m *PullRequest_head_repo) SetArchived(value *bool)() { - m.archived = value -} -// SetArchiveUrl sets the archive_url property value. The archive_url property -func (m *PullRequest_head_repo) SetArchiveUrl(value *string)() { - m.archive_url = value -} -// SetAssigneesUrl sets the assignees_url property value. The assignees_url property -func (m *PullRequest_head_repo) SetAssigneesUrl(value *string)() { - m.assignees_url = value -} -// SetBlobsUrl sets the blobs_url property value. The blobs_url property -func (m *PullRequest_head_repo) SetBlobsUrl(value *string)() { - m.blobs_url = value -} -// SetBranchesUrl sets the branches_url property value. The branches_url property -func (m *PullRequest_head_repo) SetBranchesUrl(value *string)() { - m.branches_url = value -} -// SetCloneUrl sets the clone_url property value. The clone_url property -func (m *PullRequest_head_repo) SetCloneUrl(value *string)() { - m.clone_url = value -} -// SetCollaboratorsUrl sets the collaborators_url property value. The collaborators_url property -func (m *PullRequest_head_repo) SetCollaboratorsUrl(value *string)() { - m.collaborators_url = value -} -// SetCommentsUrl sets the comments_url property value. The comments_url property -func (m *PullRequest_head_repo) SetCommentsUrl(value *string)() { - m.comments_url = value -} -// SetCommitsUrl sets the commits_url property value. The commits_url property -func (m *PullRequest_head_repo) SetCommitsUrl(value *string)() { - m.commits_url = value -} -// SetCompareUrl sets the compare_url property value. The compare_url property -func (m *PullRequest_head_repo) SetCompareUrl(value *string)() { - m.compare_url = value -} -// SetContentsUrl sets the contents_url property value. The contents_url property -func (m *PullRequest_head_repo) SetContentsUrl(value *string)() { - m.contents_url = value -} -// SetContributorsUrl sets the contributors_url property value. The contributors_url property -func (m *PullRequest_head_repo) SetContributorsUrl(value *string)() { - m.contributors_url = value -} -// SetCreatedAt sets the created_at property value. The created_at property -func (m *PullRequest_head_repo) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.created_at = value -} -// SetDefaultBranch sets the default_branch property value. The default_branch property -func (m *PullRequest_head_repo) SetDefaultBranch(value *string)() { - m.default_branch = value -} -// SetDeploymentsUrl sets the deployments_url property value. The deployments_url property -func (m *PullRequest_head_repo) SetDeploymentsUrl(value *string)() { - m.deployments_url = value -} -// SetDescription sets the description property value. The description property -func (m *PullRequest_head_repo) SetDescription(value *string)() { - m.description = value -} -// SetDisabled sets the disabled property value. The disabled property -func (m *PullRequest_head_repo) SetDisabled(value *bool)() { - m.disabled = value -} -// SetDownloadsUrl sets the downloads_url property value. The downloads_url property -func (m *PullRequest_head_repo) SetDownloadsUrl(value *string)() { - m.downloads_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_head_repo) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFork sets the fork property value. The fork property -func (m *PullRequest_head_repo) SetFork(value *bool)() { - m.fork = value -} -// SetForks sets the forks property value. The forks property -func (m *PullRequest_head_repo) SetForks(value *int32)() { - m.forks = value -} -// SetForksCount sets the forks_count property value. The forks_count property -func (m *PullRequest_head_repo) SetForksCount(value *int32)() { - m.forks_count = value -} -// SetForksUrl sets the forks_url property value. The forks_url property -func (m *PullRequest_head_repo) SetForksUrl(value *string)() { - m.forks_url = value -} -// SetFullName sets the full_name property value. The full_name property -func (m *PullRequest_head_repo) SetFullName(value *string)() { - m.full_name = value -} -// SetGitCommitsUrl sets the git_commits_url property value. The git_commits_url property -func (m *PullRequest_head_repo) SetGitCommitsUrl(value *string)() { - m.git_commits_url = value -} -// SetGitRefsUrl sets the git_refs_url property value. The git_refs_url property -func (m *PullRequest_head_repo) SetGitRefsUrl(value *string)() { - m.git_refs_url = value -} -// SetGitTagsUrl sets the git_tags_url property value. The git_tags_url property -func (m *PullRequest_head_repo) SetGitTagsUrl(value *string)() { - m.git_tags_url = value -} -// SetGitUrl sets the git_url property value. The git_url property -func (m *PullRequest_head_repo) SetGitUrl(value *string)() { - m.git_url = value -} -// SetHasDiscussions sets the has_discussions property value. The has_discussions property -func (m *PullRequest_head_repo) SetHasDiscussions(value *bool)() { - m.has_discussions = value -} -// SetHasDownloads sets the has_downloads property value. The has_downloads property -func (m *PullRequest_head_repo) SetHasDownloads(value *bool)() { - m.has_downloads = value -} -// SetHasIssues sets the has_issues property value. The has_issues property -func (m *PullRequest_head_repo) SetHasIssues(value *bool)() { - m.has_issues = value -} -// SetHasPages sets the has_pages property value. The has_pages property -func (m *PullRequest_head_repo) SetHasPages(value *bool)() { - m.has_pages = value -} -// SetHasProjects sets the has_projects property value. The has_projects property -func (m *PullRequest_head_repo) SetHasProjects(value *bool)() { - m.has_projects = value -} -// SetHasWiki sets the has_wiki property value. The has_wiki property -func (m *PullRequest_head_repo) SetHasWiki(value *bool)() { - m.has_wiki = value -} -// SetHomepage sets the homepage property value. The homepage property -func (m *PullRequest_head_repo) SetHomepage(value *string)() { - m.homepage = value -} -// SetHooksUrl sets the hooks_url property value. The hooks_url property -func (m *PullRequest_head_repo) SetHooksUrl(value *string)() { - m.hooks_url = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_head_repo) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_head_repo) SetId(value *int32)() { - m.id = value -} -// SetIssueCommentUrl sets the issue_comment_url property value. The issue_comment_url property -func (m *PullRequest_head_repo) SetIssueCommentUrl(value *string)() { - m.issue_comment_url = value -} -// SetIssueEventsUrl sets the issue_events_url property value. The issue_events_url property -func (m *PullRequest_head_repo) SetIssueEventsUrl(value *string)() { - m.issue_events_url = value -} -// SetIssuesUrl sets the issues_url property value. The issues_url property -func (m *PullRequest_head_repo) SetIssuesUrl(value *string)() { - m.issues_url = value -} -// SetIsTemplate sets the is_template property value. The is_template property -func (m *PullRequest_head_repo) SetIsTemplate(value *bool)() { - m.is_template = value -} -// SetKeysUrl sets the keys_url property value. The keys_url property -func (m *PullRequest_head_repo) SetKeysUrl(value *string)() { - m.keys_url = value -} -// SetLabelsUrl sets the labels_url property value. The labels_url property -func (m *PullRequest_head_repo) SetLabelsUrl(value *string)() { - m.labels_url = value -} -// SetLanguage sets the language property value. The language property -func (m *PullRequest_head_repo) SetLanguage(value *string)() { - m.language = value -} -// SetLanguagesUrl sets the languages_url property value. The languages_url property -func (m *PullRequest_head_repo) SetLanguagesUrl(value *string)() { - m.languages_url = value -} -// SetLicense sets the license property value. The license property -func (m *PullRequest_head_repo) SetLicense(value PullRequest_head_repo_licenseable)() { - m.license = value -} -// SetMasterBranch sets the master_branch property value. The master_branch property -func (m *PullRequest_head_repo) SetMasterBranch(value *string)() { - m.master_branch = value -} -// SetMergesUrl sets the merges_url property value. The merges_url property -func (m *PullRequest_head_repo) SetMergesUrl(value *string)() { - m.merges_url = value -} -// SetMilestonesUrl sets the milestones_url property value. The milestones_url property -func (m *PullRequest_head_repo) SetMilestonesUrl(value *string)() { - m.milestones_url = value -} -// SetMirrorUrl sets the mirror_url property value. The mirror_url property -func (m *PullRequest_head_repo) SetMirrorUrl(value *string)() { - m.mirror_url = value -} -// SetName sets the name property value. The name property -func (m *PullRequest_head_repo) SetName(value *string)() { - m.name = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_head_repo) SetNodeId(value *string)() { - m.node_id = value -} -// SetNotificationsUrl sets the notifications_url property value. The notifications_url property -func (m *PullRequest_head_repo) SetNotificationsUrl(value *string)() { - m.notifications_url = value -} -// SetOpenIssues sets the open_issues property value. The open_issues property -func (m *PullRequest_head_repo) SetOpenIssues(value *int32)() { - m.open_issues = value -} -// SetOpenIssuesCount sets the open_issues_count property value. The open_issues_count property -func (m *PullRequest_head_repo) SetOpenIssuesCount(value *int32)() { - m.open_issues_count = value -} -// SetOwner sets the owner property value. The owner property -func (m *PullRequest_head_repo) SetOwner(value PullRequest_head_repo_ownerable)() { - m.owner = value -} -// SetPermissions sets the permissions property value. The permissions property -func (m *PullRequest_head_repo) SetPermissions(value PullRequest_head_repo_permissionsable)() { - m.permissions = value -} -// SetPrivate sets the private property value. The private property -func (m *PullRequest_head_repo) SetPrivate(value *bool)() { - m.private = value -} -// SetPullsUrl sets the pulls_url property value. The pulls_url property -func (m *PullRequest_head_repo) SetPullsUrl(value *string)() { - m.pulls_url = value -} -// SetPushedAt sets the pushed_at property value. The pushed_at property -func (m *PullRequest_head_repo) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.pushed_at = value -} -// SetReleasesUrl sets the releases_url property value. The releases_url property -func (m *PullRequest_head_repo) SetReleasesUrl(value *string)() { - m.releases_url = value -} -// SetSize sets the size property value. The size property -func (m *PullRequest_head_repo) SetSize(value *int32)() { - m.size = value -} -// SetSshUrl sets the ssh_url property value. The ssh_url property -func (m *PullRequest_head_repo) SetSshUrl(value *string)() { - m.ssh_url = value -} -// SetStargazersCount sets the stargazers_count property value. The stargazers_count property -func (m *PullRequest_head_repo) SetStargazersCount(value *int32)() { - m.stargazers_count = value -} -// SetStargazersUrl sets the stargazers_url property value. The stargazers_url property -func (m *PullRequest_head_repo) SetStargazersUrl(value *string)() { - m.stargazers_url = value -} -// SetStatusesUrl sets the statuses_url property value. The statuses_url property -func (m *PullRequest_head_repo) SetStatusesUrl(value *string)() { - m.statuses_url = value -} -// SetSubscribersUrl sets the subscribers_url property value. The subscribers_url property -func (m *PullRequest_head_repo) SetSubscribersUrl(value *string)() { - m.subscribers_url = value -} -// SetSubscriptionUrl sets the subscription_url property value. The subscription_url property -func (m *PullRequest_head_repo) SetSubscriptionUrl(value *string)() { - m.subscription_url = value -} -// SetSvnUrl sets the svn_url property value. The svn_url property -func (m *PullRequest_head_repo) SetSvnUrl(value *string)() { - m.svn_url = value -} -// SetTagsUrl sets the tags_url property value. The tags_url property -func (m *PullRequest_head_repo) SetTagsUrl(value *string)() { - m.tags_url = value -} -// SetTeamsUrl sets the teams_url property value. The teams_url property -func (m *PullRequest_head_repo) SetTeamsUrl(value *string)() { - m.teams_url = value -} -// SetTempCloneToken sets the temp_clone_token property value. The temp_clone_token property -func (m *PullRequest_head_repo) SetTempCloneToken(value *string)() { - m.temp_clone_token = value -} -// SetTopics sets the topics property value. The topics property -func (m *PullRequest_head_repo) SetTopics(value []string)() { - m.topics = value -} -// SetTreesUrl sets the trees_url property value. The trees_url property -func (m *PullRequest_head_repo) SetTreesUrl(value *string)() { - m.trees_url = value -} -// SetUpdatedAt sets the updated_at property value. The updated_at property -func (m *PullRequest_head_repo) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { - m.updated_at = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_head_repo) SetUrl(value *string)() { - m.url = value -} -// SetVisibility sets the visibility property value. The repository visibility: public, private, or internal. -func (m *PullRequest_head_repo) SetVisibility(value *string)() { - m.visibility = value -} -// SetWatchers sets the watchers property value. The watchers property -func (m *PullRequest_head_repo) SetWatchers(value *int32)() { - m.watchers = value -} -// SetWatchersCount sets the watchers_count property value. The watchers_count property -func (m *PullRequest_head_repo) SetWatchersCount(value *int32)() { - m.watchers_count = value -} -// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. The web_commit_signoff_required property -func (m *PullRequest_head_repo) SetWebCommitSignoffRequired(value *bool)() { - m.web_commit_signoff_required = value -} -type PullRequest_head_repoable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAllowForking()(*bool) - GetAllowMergeCommit()(*bool) - GetAllowRebaseMerge()(*bool) - GetAllowSquashMerge()(*bool) - GetArchived()(*bool) - GetArchiveUrl()(*string) - GetAssigneesUrl()(*string) - GetBlobsUrl()(*string) - GetBranchesUrl()(*string) - GetCloneUrl()(*string) - GetCollaboratorsUrl()(*string) - GetCommentsUrl()(*string) - GetCommitsUrl()(*string) - GetCompareUrl()(*string) - GetContentsUrl()(*string) - GetContributorsUrl()(*string) - GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetDefaultBranch()(*string) - GetDeploymentsUrl()(*string) - GetDescription()(*string) - GetDisabled()(*bool) - GetDownloadsUrl()(*string) - GetEventsUrl()(*string) - GetFork()(*bool) - GetForks()(*int32) - GetForksCount()(*int32) - GetForksUrl()(*string) - GetFullName()(*string) - GetGitCommitsUrl()(*string) - GetGitRefsUrl()(*string) - GetGitTagsUrl()(*string) - GetGitUrl()(*string) - GetHasDiscussions()(*bool) - GetHasDownloads()(*bool) - GetHasIssues()(*bool) - GetHasPages()(*bool) - GetHasProjects()(*bool) - GetHasWiki()(*bool) - GetHomepage()(*string) - GetHooksUrl()(*string) - GetHtmlUrl()(*string) - GetId()(*int32) - GetIssueCommentUrl()(*string) - GetIssueEventsUrl()(*string) - GetIssuesUrl()(*string) - GetIsTemplate()(*bool) - GetKeysUrl()(*string) - GetLabelsUrl()(*string) - GetLanguage()(*string) - GetLanguagesUrl()(*string) - GetLicense()(PullRequest_head_repo_licenseable) - GetMasterBranch()(*string) - GetMergesUrl()(*string) - GetMilestonesUrl()(*string) - GetMirrorUrl()(*string) - GetName()(*string) - GetNodeId()(*string) - GetNotificationsUrl()(*string) - GetOpenIssues()(*int32) - GetOpenIssuesCount()(*int32) - GetOwner()(PullRequest_head_repo_ownerable) - GetPermissions()(PullRequest_head_repo_permissionsable) - GetPrivate()(*bool) - GetPullsUrl()(*string) - GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetReleasesUrl()(*string) - GetSize()(*int32) - GetSshUrl()(*string) - GetStargazersCount()(*int32) - GetStargazersUrl()(*string) - GetStatusesUrl()(*string) - GetSubscribersUrl()(*string) - GetSubscriptionUrl()(*string) - GetSvnUrl()(*string) - GetTagsUrl()(*string) - GetTeamsUrl()(*string) - GetTempCloneToken()(*string) - GetTopics()([]string) - GetTreesUrl()(*string) - GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetUrl()(*string) - GetVisibility()(*string) - GetWatchers()(*int32) - GetWatchersCount()(*int32) - GetWebCommitSignoffRequired()(*bool) - SetAllowForking(value *bool)() - SetAllowMergeCommit(value *bool)() - SetAllowRebaseMerge(value *bool)() - SetAllowSquashMerge(value *bool)() - SetArchived(value *bool)() - SetArchiveUrl(value *string)() - SetAssigneesUrl(value *string)() - SetBlobsUrl(value *string)() - SetBranchesUrl(value *string)() - SetCloneUrl(value *string)() - SetCollaboratorsUrl(value *string)() - SetCommentsUrl(value *string)() - SetCommitsUrl(value *string)() - SetCompareUrl(value *string)() - SetContentsUrl(value *string)() - SetContributorsUrl(value *string)() - SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetDefaultBranch(value *string)() - SetDeploymentsUrl(value *string)() - SetDescription(value *string)() - SetDisabled(value *bool)() - SetDownloadsUrl(value *string)() - SetEventsUrl(value *string)() - SetFork(value *bool)() - SetForks(value *int32)() - SetForksCount(value *int32)() - SetForksUrl(value *string)() - SetFullName(value *string)() - SetGitCommitsUrl(value *string)() - SetGitRefsUrl(value *string)() - SetGitTagsUrl(value *string)() - SetGitUrl(value *string)() - SetHasDiscussions(value *bool)() - SetHasDownloads(value *bool)() - SetHasIssues(value *bool)() - SetHasPages(value *bool)() - SetHasProjects(value *bool)() - SetHasWiki(value *bool)() - SetHomepage(value *string)() - SetHooksUrl(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int32)() - SetIssueCommentUrl(value *string)() - SetIssueEventsUrl(value *string)() - SetIssuesUrl(value *string)() - SetIsTemplate(value *bool)() - SetKeysUrl(value *string)() - SetLabelsUrl(value *string)() - SetLanguage(value *string)() - SetLanguagesUrl(value *string)() - SetLicense(value PullRequest_head_repo_licenseable)() - SetMasterBranch(value *string)() - SetMergesUrl(value *string)() - SetMilestonesUrl(value *string)() - SetMirrorUrl(value *string)() - SetName(value *string)() - SetNodeId(value *string)() - SetNotificationsUrl(value *string)() - SetOpenIssues(value *int32)() - SetOpenIssuesCount(value *int32)() - SetOwner(value PullRequest_head_repo_ownerable)() - SetPermissions(value PullRequest_head_repo_permissionsable)() - SetPrivate(value *bool)() - SetPullsUrl(value *string)() - SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetReleasesUrl(value *string)() - SetSize(value *int32)() - SetSshUrl(value *string)() - SetStargazersCount(value *int32)() - SetStargazersUrl(value *string)() - SetStatusesUrl(value *string)() - SetSubscribersUrl(value *string)() - SetSubscriptionUrl(value *string)() - SetSvnUrl(value *string)() - SetTagsUrl(value *string)() - SetTeamsUrl(value *string)() - SetTempCloneToken(value *string)() - SetTopics(value []string)() - SetTreesUrl(value *string)() - SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetUrl(value *string)() - SetVisibility(value *string)() - SetWatchers(value *int32)() - SetWatchersCount(value *int32)() - SetWebCommitSignoffRequired(value *bool)() -} diff --git a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_license.go b/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_license.go deleted file mode 100644 index fa29afcc..00000000 --- a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_license.go +++ /dev/null @@ -1,196 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_head_repo_license 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 key property - key *string - // The name property - name *string - // The node_id property - node_id *string - // The spdx_id property - spdx_id *string - // The url property - url *string -} -// NewPullRequest_head_repo_license instantiates a new PullRequest_head_repo_license and sets the default values. -func NewPullRequest_head_repo_license()(*PullRequest_head_repo_license) { - m := &PullRequest_head_repo_license{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_head_repo_licenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_head_repo_licenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_head_repo_license(), 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 *PullRequest_head_repo_license) 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 *PullRequest_head_repo_license) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKey(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["spdx_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSpdxId(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 -} -// GetKey gets the key property value. The key property -// returns a *string when successful -func (m *PullRequest_head_repo_license) GetKey()(*string) { - return m.key -} -// GetName gets the name property value. The name property -// returns a *string when successful -func (m *PullRequest_head_repo_license) GetName()(*string) { - return m.name -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_head_repo_license) GetNodeId()(*string) { - return m.node_id -} -// GetSpdxId gets the spdx_id property value. The spdx_id property -// returns a *string when successful -func (m *PullRequest_head_repo_license) GetSpdxId()(*string) { - return m.spdx_id -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_head_repo_license) GetUrl()(*string) { - return m.url -} -// Serialize serializes information the current object -func (m *PullRequest_head_repo_license) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("key", m.GetKey()) - 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.WriteStringValue("spdx_id", m.GetSpdxId()) - 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 *PullRequest_head_repo_license) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetKey sets the key property value. The key property -func (m *PullRequest_head_repo_license) SetKey(value *string)() { - m.key = value -} -// SetName sets the name property value. The name property -func (m *PullRequest_head_repo_license) SetName(value *string)() { - m.name = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_head_repo_license) SetNodeId(value *string)() { - m.node_id = value -} -// SetSpdxId sets the spdx_id property value. The spdx_id property -func (m *PullRequest_head_repo_license) SetSpdxId(value *string)() { - m.spdx_id = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_head_repo_license) SetUrl(value *string)() { - m.url = value -} -type PullRequest_head_repo_licenseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetKey()(*string) - GetName()(*string) - GetNodeId()(*string) - GetSpdxId()(*string) - GetUrl()(*string) - SetKey(value *string)() - SetName(value *string)() - SetNodeId(value *string)() - SetSpdxId(value *string)() - SetUrl(value *string)() -} diff --git a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_owner.go b/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_owner.go deleted file mode 100644 index 80ab8cb7..00000000 --- a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_owner.go +++ /dev/null @@ -1,602 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_head_repo_owner 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 - // The events_url property - events_url *string - // The followers_url property - followers_url *string - // The following_url property - following_url *string - // The gists_url property - gists_url *string - // The gravatar_id property - gravatar_id *string - // The html_url property - html_url *string - // The id property - id *int32 - // The login property - login *string - // The node_id property - node_id *string - // The organizations_url property - organizations_url *string - // The received_events_url property - received_events_url *string - // The repos_url property - repos_url *string - // The site_admin property - site_admin *bool - // The starred_url property - starred_url *string - // The subscriptions_url property - subscriptions_url *string - // The type property - typeEscaped *string - // The url property - url *string - // The user_view_type property - user_view_type *string -} -// NewPullRequest_head_repo_owner instantiates a new PullRequest_head_repo_owner and sets the default values. -func NewPullRequest_head_repo_owner()(*PullRequest_head_repo_owner) { - m := &PullRequest_head_repo_owner{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_head_repo_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_head_repo_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_head_repo_owner(), 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 *PullRequest_head_repo_owner) 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 *PullRequest_head_repo_owner) GetAvatarUrl()(*string) { - return m.avatar_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) 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 *PullRequest_head_repo_owner) 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["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_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowersUrl(val) - } - return nil - } - res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowingUrl(val) - } - return nil - } - res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGistsUrl(val) - } - return nil - } - res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGravatarId(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["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLogin(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["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOrganizationsUrl(val) - } - return nil - } - res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReceivedEventsUrl(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["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSiteAdmin(val) - } - return nil - } - res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStarredUrl(val) - } - return nil - } - res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionsUrl(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUrl(val) - } - return nil - } - res["user_view_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUserViewType(val) - } - return nil - } - return res -} -// GetFollowersUrl gets the followers_url property value. The followers_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetFollowersUrl()(*string) { - return m.followers_url -} -// GetFollowingUrl gets the following_url property value. The following_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetFollowingUrl()(*string) { - return m.following_url -} -// GetGistsUrl gets the gists_url property value. The gists_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetGistsUrl()(*string) { - return m.gists_url -} -// GetGravatarId gets the gravatar_id property value. The gravatar_id property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetGravatarId()(*string) { - return m.gravatar_id -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequest_head_repo_owner) GetId()(*int32) { - return m.id -} -// GetLogin gets the login property value. The login property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetLogin()(*string) { - return m.login -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetNodeId()(*string) { - return m.node_id -} -// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetOrganizationsUrl()(*string) { - return m.organizations_url -} -// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetReceivedEventsUrl()(*string) { - return m.received_events_url -} -// GetReposUrl gets the repos_url property value. The repos_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetReposUrl()(*string) { - return m.repos_url -} -// GetSiteAdmin gets the site_admin property value. The site_admin property -// returns a *bool when successful -func (m *PullRequest_head_repo_owner) GetSiteAdmin()(*bool) { - return m.site_admin -} -// GetStarredUrl gets the starred_url property value. The starred_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetStarredUrl()(*string) { - return m.starred_url -} -// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetSubscriptionsUrl()(*string) { - return m.subscriptions_url -} -// GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetTypeEscaped()(*string) { - return m.typeEscaped -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetUrl()(*string) { - return m.url -} -// GetUserViewType gets the user_view_type property value. The user_view_type property -// returns a *string when successful -func (m *PullRequest_head_repo_owner) GetUserViewType()(*string) { - return m.user_view_type -} -// Serialize serializes information the current object -func (m *PullRequest_head_repo_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) - 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("login", m.GetLogin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("node_id", m.GetNodeId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("repos_url", m.GetReposUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("url", m.GetUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("user_view_type", m.GetUserViewType()) - 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 *PullRequest_head_repo_owner) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAvatarUrl sets the avatar_url property value. The avatar_url property -func (m *PullRequest_head_repo_owner) SetAvatarUrl(value *string)() { - m.avatar_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_head_repo_owner) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFollowersUrl sets the followers_url property value. The followers_url property -func (m *PullRequest_head_repo_owner) SetFollowersUrl(value *string)() { - m.followers_url = value -} -// SetFollowingUrl sets the following_url property value. The following_url property -func (m *PullRequest_head_repo_owner) SetFollowingUrl(value *string)() { - m.following_url = value -} -// SetGistsUrl sets the gists_url property value. The gists_url property -func (m *PullRequest_head_repo_owner) SetGistsUrl(value *string)() { - m.gists_url = value -} -// SetGravatarId sets the gravatar_id property value. The gravatar_id property -func (m *PullRequest_head_repo_owner) SetGravatarId(value *string)() { - m.gravatar_id = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_head_repo_owner) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_head_repo_owner) SetId(value *int32)() { - m.id = value -} -// SetLogin sets the login property value. The login property -func (m *PullRequest_head_repo_owner) SetLogin(value *string)() { - m.login = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_head_repo_owner) SetNodeId(value *string)() { - m.node_id = value -} -// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property -func (m *PullRequest_head_repo_owner) SetOrganizationsUrl(value *string)() { - m.organizations_url = value -} -// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property -func (m *PullRequest_head_repo_owner) SetReceivedEventsUrl(value *string)() { - m.received_events_url = value -} -// SetReposUrl sets the repos_url property value. The repos_url property -func (m *PullRequest_head_repo_owner) SetReposUrl(value *string)() { - m.repos_url = value -} -// SetSiteAdmin sets the site_admin property value. The site_admin property -func (m *PullRequest_head_repo_owner) SetSiteAdmin(value *bool)() { - m.site_admin = value -} -// SetStarredUrl sets the starred_url property value. The starred_url property -func (m *PullRequest_head_repo_owner) SetStarredUrl(value *string)() { - m.starred_url = value -} -// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property -func (m *PullRequest_head_repo_owner) SetSubscriptionsUrl(value *string)() { - m.subscriptions_url = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *PullRequest_head_repo_owner) SetTypeEscaped(value *string)() { - m.typeEscaped = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_head_repo_owner) SetUrl(value *string)() { - m.url = value -} -// SetUserViewType sets the user_view_type property value. The user_view_type property -func (m *PullRequest_head_repo_owner) SetUserViewType(value *string)() { - m.user_view_type = value -} -type PullRequest_head_repo_ownerable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAvatarUrl()(*string) - GetEventsUrl()(*string) - GetFollowersUrl()(*string) - GetFollowingUrl()(*string) - GetGistsUrl()(*string) - GetGravatarId()(*string) - GetHtmlUrl()(*string) - GetId()(*int32) - GetLogin()(*string) - GetNodeId()(*string) - GetOrganizationsUrl()(*string) - GetReceivedEventsUrl()(*string) - GetReposUrl()(*string) - GetSiteAdmin()(*bool) - GetStarredUrl()(*string) - GetSubscriptionsUrl()(*string) - GetTypeEscaped()(*string) - GetUrl()(*string) - GetUserViewType()(*string) - SetAvatarUrl(value *string)() - SetEventsUrl(value *string)() - SetFollowersUrl(value *string)() - SetFollowingUrl(value *string)() - SetGistsUrl(value *string)() - SetGravatarId(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int32)() - SetLogin(value *string)() - SetNodeId(value *string)() - SetOrganizationsUrl(value *string)() - SetReceivedEventsUrl(value *string)() - SetReposUrl(value *string)() - SetSiteAdmin(value *bool)() - SetStarredUrl(value *string)() - SetSubscriptionsUrl(value *string)() - SetTypeEscaped(value *string)() - SetUrl(value *string)() - SetUserViewType(value *string)() -} diff --git a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_permissions.go b/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_permissions.go deleted file mode 100644 index fa9bee53..00000000 --- a/pkg/github/models/pull_request_escaped_head_escaped_repo_escaped_permissions.go +++ /dev/null @@ -1,196 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_head_repo_permissions 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 admin property - admin *bool - // The maintain property - maintain *bool - // The pull property - pull *bool - // The push property - push *bool - // The triage property - triage *bool -} -// NewPullRequest_head_repo_permissions instantiates a new PullRequest_head_repo_permissions and sets the default values. -func NewPullRequest_head_repo_permissions()(*PullRequest_head_repo_permissions) { - m := &PullRequest_head_repo_permissions{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_head_repo_permissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_head_repo_permissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_head_repo_permissions(), 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 *PullRequest_head_repo_permissions) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAdmin gets the admin property value. The admin property -// returns a *bool when successful -func (m *PullRequest_head_repo_permissions) GetAdmin()(*bool) { - return m.admin -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *PullRequest_head_repo_permissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetAdmin(val) - } - return nil - } - res["maintain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetMaintain(val) - } - return nil - } - res["pull"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPull(val) - } - return nil - } - res["push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetPush(val) - } - return nil - } - res["triage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetTriage(val) - } - return nil - } - return res -} -// GetMaintain gets the maintain property value. The maintain property -// returns a *bool when successful -func (m *PullRequest_head_repo_permissions) GetMaintain()(*bool) { - return m.maintain -} -// GetPull gets the pull property value. The pull property -// returns a *bool when successful -func (m *PullRequest_head_repo_permissions) GetPull()(*bool) { - return m.pull -} -// GetPush gets the push property value. The push property -// returns a *bool when successful -func (m *PullRequest_head_repo_permissions) GetPush()(*bool) { - return m.push -} -// GetTriage gets the triage property value. The triage property -// returns a *bool when successful -func (m *PullRequest_head_repo_permissions) GetTriage()(*bool) { - return m.triage -} -// Serialize serializes information the current object -func (m *PullRequest_head_repo_permissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("admin", m.GetAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("maintain", m.GetMaintain()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("pull", m.GetPull()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("push", m.GetPush()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("triage", m.GetTriage()) - 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 *PullRequest_head_repo_permissions) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAdmin sets the admin property value. The admin property -func (m *PullRequest_head_repo_permissions) SetAdmin(value *bool)() { - m.admin = value -} -// SetMaintain sets the maintain property value. The maintain property -func (m *PullRequest_head_repo_permissions) SetMaintain(value *bool)() { - m.maintain = value -} -// SetPull sets the pull property value. The pull property -func (m *PullRequest_head_repo_permissions) SetPull(value *bool)() { - m.pull = value -} -// SetPush sets the push property value. The push property -func (m *PullRequest_head_repo_permissions) SetPush(value *bool)() { - m.push = value -} -// SetTriage sets the triage property value. The triage property -func (m *PullRequest_head_repo_permissions) SetTriage(value *bool)() { - m.triage = value -} -type PullRequest_head_repo_permissionsable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAdmin()(*bool) - GetMaintain()(*bool) - GetPull()(*bool) - GetPush()(*bool) - GetTriage()(*bool) - SetAdmin(value *bool)() - SetMaintain(value *bool)() - SetPull(value *bool)() - SetPush(value *bool)() - SetTriage(value *bool)() -} diff --git a/pkg/github/models/pull_request_escaped_head_escaped_user.go b/pkg/github/models/pull_request_escaped_head_escaped_user.go deleted file mode 100644 index 519f89d8..00000000 --- a/pkg/github/models/pull_request_escaped_head_escaped_user.go +++ /dev/null @@ -1,602 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type PullRequest_head_user 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 - // The events_url property - events_url *string - // The followers_url property - followers_url *string - // The following_url property - following_url *string - // The gists_url property - gists_url *string - // The gravatar_id property - gravatar_id *string - // The html_url property - html_url *string - // The id property - id *int64 - // The login property - login *string - // The node_id property - node_id *string - // The organizations_url property - organizations_url *string - // The received_events_url property - received_events_url *string - // The repos_url property - repos_url *string - // The site_admin property - site_admin *bool - // The starred_url property - starred_url *string - // The subscriptions_url property - subscriptions_url *string - // The type property - typeEscaped *string - // The url property - url *string - // The user_view_type property - user_view_type *string -} -// NewPullRequest_head_user instantiates a new PullRequest_head_user and sets the default values. -func NewPullRequest_head_user()(*PullRequest_head_user) { - m := &PullRequest_head_user{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreatePullRequest_head_userFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreatePullRequest_head_userFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPullRequest_head_user(), 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 *PullRequest_head_user) 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 *PullRequest_head_user) GetAvatarUrl()(*string) { - return m.avatar_url -} -// GetEventsUrl gets the events_url property value. The events_url property -// returns a *string when successful -func (m *PullRequest_head_user) 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 *PullRequest_head_user) 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["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_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowersUrl(val) - } - return nil - } - res["following_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFollowingUrl(val) - } - return nil - } - res["gists_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGistsUrl(val) - } - return nil - } - res["gravatar_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetGravatarId(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.GetInt64Value() - if err != nil { - return err - } - if val != nil { - m.SetId(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["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["organizations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOrganizationsUrl(val) - } - return nil - } - res["received_events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetReceivedEventsUrl(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["site_admin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSiteAdmin(val) - } - return nil - } - res["starred_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetStarredUrl(val) - } - return nil - } - res["subscriptions_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSubscriptionsUrl(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUrl(val) - } - return nil - } - res["user_view_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUserViewType(val) - } - return nil - } - return res -} -// GetFollowersUrl gets the followers_url property value. The followers_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetFollowersUrl()(*string) { - return m.followers_url -} -// GetFollowingUrl gets the following_url property value. The following_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetFollowingUrl()(*string) { - return m.following_url -} -// GetGistsUrl gets the gists_url property value. The gists_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetGistsUrl()(*string) { - return m.gists_url -} -// GetGravatarId gets the gravatar_id property value. The gravatar_id property -// returns a *string when successful -func (m *PullRequest_head_user) GetGravatarId()(*string) { - return m.gravatar_id -} -// GetHtmlUrl gets the html_url property value. The html_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetHtmlUrl()(*string) { - return m.html_url -} -// GetId gets the id property value. The id property -// returns a *int64 when successful -func (m *PullRequest_head_user) GetId()(*int64) { - return m.id -} -// GetLogin gets the login property value. The login property -// returns a *string when successful -func (m *PullRequest_head_user) GetLogin()(*string) { - return m.login -} -// GetNodeId gets the node_id property value. The node_id property -// returns a *string when successful -func (m *PullRequest_head_user) GetNodeId()(*string) { - return m.node_id -} -// GetOrganizationsUrl gets the organizations_url property value. The organizations_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetOrganizationsUrl()(*string) { - return m.organizations_url -} -// GetReceivedEventsUrl gets the received_events_url property value. The received_events_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetReceivedEventsUrl()(*string) { - return m.received_events_url -} -// GetReposUrl gets the repos_url property value. The repos_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetReposUrl()(*string) { - return m.repos_url -} -// GetSiteAdmin gets the site_admin property value. The site_admin property -// returns a *bool when successful -func (m *PullRequest_head_user) GetSiteAdmin()(*bool) { - return m.site_admin -} -// GetStarredUrl gets the starred_url property value. The starred_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetStarredUrl()(*string) { - return m.starred_url -} -// GetSubscriptionsUrl gets the subscriptions_url property value. The subscriptions_url property -// returns a *string when successful -func (m *PullRequest_head_user) GetSubscriptionsUrl()(*string) { - return m.subscriptions_url -} -// GetTypeEscaped gets the type property value. The type property -// returns a *string when successful -func (m *PullRequest_head_user) GetTypeEscaped()(*string) { - return m.typeEscaped -} -// GetUrl gets the url property value. The url property -// returns a *string when successful -func (m *PullRequest_head_user) GetUrl()(*string) { - return m.url -} -// GetUserViewType gets the user_view_type property value. The user_view_type property -// returns a *string when successful -func (m *PullRequest_head_user) GetUserViewType()(*string) { - return m.user_view_type -} -// Serialize serializes information the current object -func (m *PullRequest_head_user) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("events_url", m.GetEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("followers_url", m.GetFollowersUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("following_url", m.GetFollowingUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gists_url", m.GetGistsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("gravatar_id", m.GetGravatarId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteInt64Value("id", m.GetId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("login", m.GetLogin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("node_id", m.GetNodeId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("organizations_url", m.GetOrganizationsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("received_events_url", m.GetReceivedEventsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("repos_url", m.GetReposUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("site_admin", m.GetSiteAdmin()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("starred_url", m.GetStarredUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("subscriptions_url", m.GetSubscriptionsUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("url", m.GetUrl()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("user_view_type", m.GetUserViewType()) - 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 *PullRequest_head_user) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAvatarUrl sets the avatar_url property value. The avatar_url property -func (m *PullRequest_head_user) SetAvatarUrl(value *string)() { - m.avatar_url = value -} -// SetEventsUrl sets the events_url property value. The events_url property -func (m *PullRequest_head_user) SetEventsUrl(value *string)() { - m.events_url = value -} -// SetFollowersUrl sets the followers_url property value. The followers_url property -func (m *PullRequest_head_user) SetFollowersUrl(value *string)() { - m.followers_url = value -} -// SetFollowingUrl sets the following_url property value. The following_url property -func (m *PullRequest_head_user) SetFollowingUrl(value *string)() { - m.following_url = value -} -// SetGistsUrl sets the gists_url property value. The gists_url property -func (m *PullRequest_head_user) SetGistsUrl(value *string)() { - m.gists_url = value -} -// SetGravatarId sets the gravatar_id property value. The gravatar_id property -func (m *PullRequest_head_user) SetGravatarId(value *string)() { - m.gravatar_id = value -} -// SetHtmlUrl sets the html_url property value. The html_url property -func (m *PullRequest_head_user) SetHtmlUrl(value *string)() { - m.html_url = value -} -// SetId sets the id property value. The id property -func (m *PullRequest_head_user) SetId(value *int64)() { - m.id = value -} -// SetLogin sets the login property value. The login property -func (m *PullRequest_head_user) SetLogin(value *string)() { - m.login = value -} -// SetNodeId sets the node_id property value. The node_id property -func (m *PullRequest_head_user) SetNodeId(value *string)() { - m.node_id = value -} -// SetOrganizationsUrl sets the organizations_url property value. The organizations_url property -func (m *PullRequest_head_user) SetOrganizationsUrl(value *string)() { - m.organizations_url = value -} -// SetReceivedEventsUrl sets the received_events_url property value. The received_events_url property -func (m *PullRequest_head_user) SetReceivedEventsUrl(value *string)() { - m.received_events_url = value -} -// SetReposUrl sets the repos_url property value. The repos_url property -func (m *PullRequest_head_user) SetReposUrl(value *string)() { - m.repos_url = value -} -// SetSiteAdmin sets the site_admin property value. The site_admin property -func (m *PullRequest_head_user) SetSiteAdmin(value *bool)() { - m.site_admin = value -} -// SetStarredUrl sets the starred_url property value. The starred_url property -func (m *PullRequest_head_user) SetStarredUrl(value *string)() { - m.starred_url = value -} -// SetSubscriptionsUrl sets the subscriptions_url property value. The subscriptions_url property -func (m *PullRequest_head_user) SetSubscriptionsUrl(value *string)() { - m.subscriptions_url = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *PullRequest_head_user) SetTypeEscaped(value *string)() { - m.typeEscaped = value -} -// SetUrl sets the url property value. The url property -func (m *PullRequest_head_user) SetUrl(value *string)() { - m.url = value -} -// SetUserViewType sets the user_view_type property value. The user_view_type property -func (m *PullRequest_head_user) SetUserViewType(value *string)() { - m.user_view_type = value -} -type PullRequest_head_userable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAvatarUrl()(*string) - GetEventsUrl()(*string) - GetFollowersUrl()(*string) - GetFollowingUrl()(*string) - GetGistsUrl()(*string) - GetGravatarId()(*string) - GetHtmlUrl()(*string) - GetId()(*int64) - GetLogin()(*string) - GetNodeId()(*string) - GetOrganizationsUrl()(*string) - GetReceivedEventsUrl()(*string) - GetReposUrl()(*string) - GetSiteAdmin()(*bool) - GetStarredUrl()(*string) - GetSubscriptionsUrl()(*string) - GetTypeEscaped()(*string) - GetUrl()(*string) - GetUserViewType()(*string) - SetAvatarUrl(value *string)() - SetEventsUrl(value *string)() - SetFollowersUrl(value *string)() - SetFollowingUrl(value *string)() - SetGistsUrl(value *string)() - SetGravatarId(value *string)() - SetHtmlUrl(value *string)() - SetId(value *int64)() - SetLogin(value *string)() - SetNodeId(value *string)() - SetOrganizationsUrl(value *string)() - SetReceivedEventsUrl(value *string)() - SetReposUrl(value *string)() - SetSiteAdmin(value *bool)() - SetStarredUrl(value *string)() - SetSubscriptionsUrl(value *string)() - SetTypeEscaped(value *string)() - SetUrl(value *string)() - SetUserViewType(value *string)() -} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go b/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go index 1134d641..159b4c57 100644 --- a/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go +++ b/pkg/github/orgs/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go @@ -4,19 +4,22 @@ type AttachPostRequestBody_scope int const ( ALL_ATTACHPOSTREQUESTBODY_SCOPE AttachPostRequestBody_scope = iota + ALL_WITHOUT_CONFIGURATIONS_ATTACHPOSTREQUESTBODY_SCOPE PUBLIC_ATTACHPOSTREQUESTBODY_SCOPE PRIVATE_OR_INTERNAL_ATTACHPOSTREQUESTBODY_SCOPE SELECTED_ATTACHPOSTREQUESTBODY_SCOPE ) func (i AttachPostRequestBody_scope) String() string { - return []string{"all", "public", "private_or_internal", "selected"}[i] + return []string{"all", "all_without_configurations", "public", "private_or_internal", "selected"}[i] } func ParseAttachPostRequestBody_scope(v string) (any, error) { result := ALL_ATTACHPOSTREQUESTBODY_SCOPE switch v { case "all": result = ALL_ATTACHPOSTREQUESTBODY_SCOPE + case "all_without_configurations": + result = ALL_WITHOUT_CONFIGURATIONS_ATTACHPOSTREQUESTBODY_SCOPE case "public": result = PUBLIC_ATTACHPOSTREQUESTBODY_SCOPE case "private_or_internal": diff --git a/pkg/github/orgs/item_copilot_metrics_request_builder.go b/pkg/github/orgs/item_copilot_metrics_request_builder.go new file mode 100644 index 00000000..3cba7648 --- /dev/null +++ b/pkg/github/orgs/item_copilot_metrics_request_builder.go @@ -0,0 +1,81 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemCopilotMetricsRequestBuilder builds and executes requests for operations under \orgs\{org}\copilot\metrics +type ItemCopilotMetricsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCopilotMetricsRequestBuilderGetQueryParameters use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot 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 ItemCopilotMetricsRequestBuilderGetQueryParameters 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"` +} +// NewItemCopilotMetricsRequestBuilderInternal instantiates a new ItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemCopilotMetricsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotMetricsRequestBuilder) { + m := &ItemCopilotMetricsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemCopilotMetricsRequestBuilder instantiates a new ItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemCopilotMetricsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCopilotMetricsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCopilotMetricsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot 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 []CopilotUsageMetricsDayable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 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-metrics#get-copilot-metrics-for-an-organization +func (m *ItemCopilotMetricsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotMetricsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsDayFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable) + } + } + return val, nil +} +// ToGetRequestInformation use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot 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 *ItemCopilotMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotMetricsRequestBuilderGetQueryParameters])(*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 *ItemCopilotMetricsRequestBuilder when successful +func (m *ItemCopilotMetricsRequestBuilder) WithUrl(rawUrl string)(*ItemCopilotMetricsRequestBuilder) { + return NewItemCopilotMetricsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_copilot_request_builder.go b/pkg/github/orgs/item_copilot_request_builder.go index a9a8889a..ab6271e2 100644 --- a/pkg/github/orgs/item_copilot_request_builder.go +++ b/pkg/github/orgs/item_copilot_request_builder.go @@ -26,6 +26,11 @@ func NewItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26 urlParams["request-raw-url"] = rawUrl return NewItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } +// Metrics the metrics property +// returns a *ItemCopilotMetricsRequestBuilder when successful +func (m *ItemCopilotRequestBuilder) Metrics()(*ItemCopilotMetricsRequestBuilder) { + return NewItemCopilotMetricsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Usage the usage property // returns a *ItemCopilotUsageRequestBuilder when successful func (m *ItemCopilotRequestBuilder) Usage()(*ItemCopilotUsageRequestBuilder) { diff --git a/pkg/github/orgs/item_team_item_copilot_metrics_request_builder.go b/pkg/github/orgs/item_team_item_copilot_metrics_request_builder.go new file mode 100644 index 00000000..47b0e35f --- /dev/null +++ b/pkg/github/orgs/item_team_item_copilot_metrics_request_builder.go @@ -0,0 +1,81 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemTeamItemCopilotMetricsRequestBuilder builds and executes requests for operations under \orgs\{org}\team\{team_slug}\copilot\metrics +type ItemTeamItemCopilotMetricsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +type ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters 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"` +} +// NewItemTeamItemCopilotMetricsRequestBuilderInternal instantiates a new ItemTeamItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemTeamItemCopilotMetricsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotMetricsRequestBuilder) { + m := &ItemTeamItemCopilotMetricsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters), + } + return m +} +// NewItemTeamItemCopilotMetricsRequestBuilder instantiates a new ItemTeamItemCopilotMetricsRequestBuilder and sets the default values. +func NewItemTeamItemCopilotMetricsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamItemCopilotMetricsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamItemCopilotMetricsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a []CopilotUsageMetricsDayable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 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-metrics#get-copilot-metrics-for-a-team +func (m *ItemTeamItemCopilotMetricsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCopilotUsageMetricsDayFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotUsageMetricsDayable) + } + } + return val, nil +} +// ToGetRequestInformation use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. 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.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemTeamItemCopilotMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters])(*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 *ItemTeamItemCopilotMetricsRequestBuilder when successful +func (m *ItemTeamItemCopilotMetricsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamItemCopilotMetricsRequestBuilder) { + return NewItemTeamItemCopilotMetricsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_team_item_copilot_request_builder.go b/pkg/github/orgs/item_team_item_copilot_request_builder.go index 184e910c..562bef1d 100644 --- a/pkg/github/orgs/item_team_item_copilot_request_builder.go +++ b/pkg/github/orgs/item_team_item_copilot_request_builder.go @@ -21,6 +21,11 @@ func NewItemTeamItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4187 urlParams["request-raw-url"] = rawUrl return NewItemTeamItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } +// Metrics the metrics property +// returns a *ItemTeamItemCopilotMetricsRequestBuilder when successful +func (m *ItemTeamItemCopilotRequestBuilder) Metrics()(*ItemTeamItemCopilotMetricsRequestBuilder) { + return NewItemTeamItemCopilotMetricsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Usage the usage property // returns a *ItemTeamItemCopilotUsageRequestBuilder when successful func (m *ItemTeamItemCopilotRequestBuilder) Usage()(*ItemTeamItemCopilotUsageRequestBuilder) { diff --git a/pkg/github/user/orgs_request_builder.go b/pkg/github/user/orgs_request_builder.go index cad3e819..cfec87a9 100644 --- a/pkg/github/user/orgs_request_builder.go +++ b/pkg/github/user/orgs_request_builder.go @@ -10,7 +10,7 @@ import ( type OrgsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// OrgsRequestBuilderGetQueryParameters list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +// OrgsRequestBuilderGetQueryParameters list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. type OrgsRequestBuilderGetQueryParameters 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"` @@ -30,7 +30,7 @@ func NewOrgsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1 urlParams["request-raw-url"] = rawUrl return NewOrgsRequestBuilderInternal(urlParams, requestAdapter) } -// Get list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +// Get list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. // returns a []OrganizationSimpleable 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 @@ -58,7 +58,7 @@ func (m *OrgsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae } return val, nil } -// ToGetRequestInformation list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. +// ToGetRequestInformation list organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. // returns a *RequestInformation when successful func (m *OrgsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrgsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_events_request_builder.go b/pkg/github/users/item_events_request_builder.go index 1f14edf1..e65ed47b 100644 --- a/pkg/github/users/item_events_request_builder.go +++ b/pkg/github/users/item_events_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemEventsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemEventsRequestBuilderGetQueryParameters if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +// ItemEventsRequestBuilderGetQueryParameters if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. type ItemEventsRequestBuilderGetQueryParameters 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"` @@ -30,7 +30,7 @@ func NewItemEventsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263 urlParams["request-raw-url"] = rawUrl return NewItemEventsRequestBuilderInternal(urlParams, requestAdapter) } -// Get if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +// Get if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. // returns a []Eventable when successful // [API method documentation] // @@ -62,7 +62,7 @@ func (m *ItemEventsRequestBuilder) Orgs()(*ItemEventsOrgsRequestBuilder) { func (m *ItemEventsRequestBuilder) Public()(*ItemEventsPublicRequestBuilder) { return NewItemEventsPublicRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. +// ToGetRequestInformation if you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. // returns a *RequestInformation when successful func (m *ItemEventsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemEventsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)