From 9c4be2cae5ba9eb868277a5b0209fa8c4845bb09 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 19 Dec 2024 13:33:31 -0800 Subject: [PATCH] GHES 3.14: Changes in generated code (#124) * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code --- ...m_access_escaped_tokens_request_builder.go | 4 +- ..._secret_scanning_alerts_request_builder.go | 2 +- pkg/github/kiota-lock.json | 2 +- .../manage/v1_config_init_request_builder.go | 6 +- .../v1_config_license_request_builder.go | 8 +- .../models/api_overview_escaped_domains.go | 29 ++ ...domains_escaped_actions_escaped_inbound.go | 121 +++++++ pkg/github/models/custom_property.go | 30 ++ ...om_property_escaped_source_escaped_type.go | 34 ++ .../models/custom_property_set_payload.go | 304 ++++++++++++++++++ ..._set_payload_escaped_value_escaped_type.go | 40 +++ ...dependency_graph_spdx_sbom_escaped_sbom.go | 99 ++++-- ...sbom_escaped_sbom_escaped_relationships.go | 138 ++++++++ pkg/github/models/issue.go | 29 ++ pkg/github/models/issue_search_result_item.go | 29 ++ ...aped_sub_escaped_issues_escaped_summary.go | 138 ++++++++ pkg/github/models/nullable_issue.go | 29 ++ .../organization_programmatic_access_grant.go | 29 ++ ...ation_programmatic_access_grant_request.go | 29 ++ pkg/github/models/organization_role.go | 60 ++++ ...nization_role_escaped_base_escaped_role.go | 43 +++ .../organization_role_escaped_source.go | 37 +++ .../rate_limit_overview_escaped_resources.go | 29 ++ .../models/repository_rule_enforcement.go | 2 +- ...ry_rule_pull_request_escaped_parameters.go | 35 ++ pkg/github/models/repository_ruleset.go | 12 +- .../repository_ruleset_escaped_target.go | 2 +- pkg/github/models/sub_issues_summary.go | 138 ++++++++ pkg/github/models/team_role_assignment.go | 30 ++ ...team_role_assignment_escaped_assignment.go | 37 +++ pkg/github/models/user_role_assignment.go | 71 ++++ ...user_role_assignment_escaped_assignment.go | 37 +++ pkg/github/models/users.go | 152 +++------ pkg/github/models/users_escaped_matches.go | 115 ------- ...request_body_escaped_value_escaped_type.go | 40 --- ...escaped_put_request_body_escaped_target.go | 2 +- ...equest_body_escaped_source_escaped_type.go | 34 ++ ...lesets_post_request_body_escaped_target.go | 2 +- pkg/github/orgs/item_hooks_request_builder.go | 6 +- ..._with_hook_escaped_item_request_builder.go | 4 +- ..._property_escaped_name_put_request_body.go | 273 ---------------- ...perty_escaped_name_item_request_builder.go | 4 +- ...m_with_ruleset_escaped_put_request_body.go | 6 +- .../orgs/item_rulesets_post_request_body.go | 6 +- ...em_rulesets_rule_suites_request_builder.go | 4 +- ..._secret_scanning_alerts_request_builder.go | 2 +- .../item_item_actions_runs_request_builder.go | 6 +- ...ons_workflows_item_runs_request_builder.go | 6 +- ...commit_escaped_sha_item_request_builder.go | 6 +- .../item_item_commits_request_builder.go | 6 +- ...pare_with_basehead_item_request_builder.go | 6 +- .../item_item_git_commits_request_builder.go | 4 +- ...commit_escaped_sha_item_request_builder.go | 4 +- .../item_item_git_tags_request_builder.go | 4 +- ...th_tag_escaped_sha_item_request_builder.go | 4 +- ..._with_hook_escaped_item_request_builder.go | 3 +- ...with_asset_escaped_item_request_builder.go | 4 +- ...m_with_ruleset_escaped_put_request_body.go | 6 +- .../item_item_rulesets_post_request_body.go | 6 +- ..._secret_scanning_alerts_request_builder.go | 2 +- 60 files changed, 1709 insertions(+), 641 deletions(-) create mode 100644 pkg/github/models/api_overview_escaped_domains_escaped_actions_escaped_inbound.go create mode 100644 pkg/github/models/custom_property_escaped_source_escaped_type.go create mode 100644 pkg/github/models/custom_property_set_payload.go create mode 100644 pkg/github/models/custom_property_set_payload_escaped_value_escaped_type.go create mode 100644 pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go create mode 100644 pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go create mode 100644 pkg/github/models/organization_role_escaped_base_escaped_role.go create mode 100644 pkg/github/models/organization_role_escaped_source.go create mode 100644 pkg/github/models/sub_issues_summary.go create mode 100644 pkg/github/models/team_role_assignment_escaped_assignment.go create mode 100644 pkg/github/models/user_role_assignment_escaped_assignment.go delete mode 100644 pkg/github/models/users_escaped_matches.go delete mode 100644 pkg/github/orgs/item/properties/schema/item/with_custom_escaped_property_escaped_name_put_request_body_escaped_value_escaped_type.go create mode 100644 pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_source_escaped_type.go delete mode 100644 pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go diff --git a/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go b/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go index 9904edc3..1aeb59ac 100644 --- a/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go +++ b/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go @@ -23,7 +23,7 @@ func NewInstallationsItemAccess_tokensRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewInstallationsItemAccess_tokensRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-server@3.14/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// Post creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-server@3.14/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. // returns a InstallationTokenable 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 @@ -52,7 +52,7 @@ func (m *InstallationsItemAccess_tokensRequestBuilder) Post(ctx context.Context, } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.InstallationTokenable), nil } -// ToPostRequestInformation creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-server@3.14/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// ToPostRequestInformation creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-server@3.14/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. // returns a *RequestInformation when successful func (m *InstallationsItemAccess_tokensRequestBuilder) ToPostRequestInformation(ctx context.Context, body InstallationsItemAccess_tokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go b/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go index 4e93cc14..cd682b52 100644 --- a/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go +++ b/pkg/github/enterprises/item_secret_scanning_alerts_request_builder.go @@ -23,7 +23,7 @@ type ItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. Resolution *string `uriparametername:"resolution"` - // A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + // A comma-separated list of secret types to return. By default all secret types are returned. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. Secret_type *string `uriparametername:"secret_type"` // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. Sort *ie731c1b19a2e5cc53591a2f3e26c1721bd2d17fb9da2b8efca9e1e81c4c05962.GetSortQueryParameterType `uriparametername:"sort"` diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 9010a360..07864336 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "AA6BA43C3BE179931F944F31F424DEA348961212C3443EA8A7F7EC9591A31AA6AE9A9376E6DEA5562B70708385E8FDB5459877AFE280ECB903E286931A633B3D", + "descriptionHash": "52B29023B2DE1FF8F64CFB34BACA89815C265C38334960391ECA30C8D2CE2F432CE6D672D1CD93775667A7CA754DBD10451ABBCFACA98FF0CCB2299D504A2109", "descriptionLocation": "../../../../../schemas/ghes-3.14.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/manage/v1_config_init_request_builder.go b/pkg/github/manage/v1_config_init_request_builder.go index 5f46e191..0c9a8c49 100644 --- a/pkg/github/manage/v1_config_init_request_builder.go +++ b/pkg/github/manage/v1_config_init_request_builder.go @@ -23,10 +23,10 @@ func NewV1ConfigInitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewV1ConfigInitRequestBuilderInternal(urlParams, requestAdapter) } -// Post when you boot a GitHub instance for the first time, you can use this endpoint to upload a license.Note that you afterwards need to `POST` to [`/manage/v1/config/apply`](https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#start-configuration-apply-process) to start the actual configuration process.This endpoint also sets the root site administrator password which is used to authenticate with the GHES Manage API and the Management Console.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). +// Post when you boot and set up a GitHub instance for the first time, you can use this endpoint to upload a license and set the initial root site administrator password.> [!IMPORTANT]> To start the configuration process and apply the license, you need to `POST` to [`/manage/v1/config/apply`](https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#start-configuration-apply-process)The root site administrator password provided when calling this endpoint is used to authenticate for all other endpoints in the GHES Manage API and the Management Console UI.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). // [API method documentation] // -// [API method documentation]: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-upload +// [API method documentation]: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password func (m *V1ConfigInitRequestBuilder) Post(ctx context.Context, body ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GhesConfigInitRequestable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -38,7 +38,7 @@ func (m *V1ConfigInitRequestBuilder) Post(ctx context.Context, body ie1e2072a5a4 } return nil } -// ToPostRequestInformation when you boot a GitHub instance for the first time, you can use this endpoint to upload a license.Note that you afterwards need to `POST` to [`/manage/v1/config/apply`](https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#start-configuration-apply-process) to start the actual configuration process.This endpoint also sets the root site administrator password which is used to authenticate with the GHES Manage API and the Management Console.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). +// ToPostRequestInformation when you boot and set up a GitHub instance for the first time, you can use this endpoint to upload a license and set the initial root site administrator password.> [!IMPORTANT]> To start the configuration process and apply the license, you need to `POST` to [`/manage/v1/config/apply`](https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#start-configuration-apply-process)The root site administrator password provided when calling this endpoint is used to authenticate for all other endpoints in the GHES Manage API and the Management Console UI.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). // returns a *RequestInformation when successful func (m *V1ConfigInitRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GhesConfigInitRequestable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/manage/v1_config_license_request_builder.go b/pkg/github/manage/v1_config_license_request_builder.go index 35f3c92c..57bdc499 100644 --- a/pkg/github/manage/v1_config_license_request_builder.go +++ b/pkg/github/manage/v1_config_license_request_builder.go @@ -10,9 +10,9 @@ import ( type V1ConfigLicenseRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// V1ConfigLicenseRequestBuilderPutQueryParameters uploads an enterprise license. This operation does not automatically activate the license.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). +// V1ConfigLicenseRequestBuilderPutQueryParameters uploads a new enterprise license. In order to apply it right away, use the `apply` query parameter.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). type V1ConfigLicenseRequestBuilderPutQueryParameters struct { - // Whether to apply changes from the license. Uploading a license does not automatically apply changes. To make the changes effective, you can specify to apply the license too. + // Whether to instantly apply changes from the license. Otherwise the new license can be applied using the [`/manage/v1/config/apply`](https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#start-configuration-apply-process) endpoint. Apply *bool `uriparametername:"apply"` } // Check the check property @@ -52,7 +52,7 @@ func (m *V1ConfigLicenseRequestBuilder) Get(ctx context.Context, requestConfigur } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GhesLicenseInfoable), nil } -// Put uploads an enterprise license. This operation does not automatically activate the license.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). +// Put uploads a new enterprise license. In order to apply it right away, use the `apply` query parameter.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). // [API method documentation] // // [API method documentation]: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license @@ -75,7 +75,7 @@ func (m *V1ConfigLicenseRequestBuilder) ToGetRequestInformation(ctx context.Cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation uploads an enterprise license. This operation does not automatically activate the license.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). +// ToPutRequestInformation uploads a new enterprise license. In order to apply it right away, use the `apply` query parameter.> [!NOTE]> The request body for this operation must be submitted as `multipart/form-data` data. You can can reference the license file by prefixing the filename with the `@` symbol using `curl`. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#-F). // returns a *RequestInformation when successful func (m *V1ConfigLicenseRequestBuilder) ToPutRequestInformation(ctx context.Context, body ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GhesUploadLicenseRequestable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[V1ConfigLicenseRequestBuilderPutQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/models/api_overview_escaped_domains.go b/pkg/github/models/api_overview_escaped_domains.go index 32950e02..b8d2838e 100644 --- a/pkg/github/models/api_overview_escaped_domains.go +++ b/pkg/github/models/api_overview_escaped_domains.go @@ -7,6 +7,8 @@ import ( type ApiOverview_domains struct { // The actions property actions []string + // The actions_inbound property + actions_inbound ApiOverview_domains_actions_inboundable // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The artifact_attestations property @@ -37,6 +39,11 @@ func CreateApiOverview_domainsFromDiscriminatorValue(parseNode i878a80d2330e89d2 func (m *ApiOverview_domains) GetActions()([]string) { return m.actions } +// GetActionsInbound gets the actions_inbound property value. The actions_inbound property +// returns a ApiOverview_domains_actions_inboundable when successful +func (m *ApiOverview_domains) GetActionsInbound()(ApiOverview_domains_actions_inboundable) { + return m.actions_inbound +} // 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 *ApiOverview_domains) GetAdditionalData()(map[string]any) { @@ -77,6 +84,16 @@ func (m *ApiOverview_domains) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["actions_inbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApiOverview_domains_actions_inboundFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActionsInbound(val.(ApiOverview_domains_actions_inboundable)) + } + return nil + } res["artifact_attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateApiOverview_domains_artifact_attestationsFromDiscriminatorValue) if err != nil { @@ -171,6 +188,12 @@ func (m *ApiOverview_domains) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + { + err := writer.WriteObjectValue("actions_inbound", m.GetActionsInbound()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("artifact_attestations", m.GetArtifactAttestations()) if err != nil { @@ -213,6 +236,10 @@ func (m *ApiOverview_domains) Serialize(writer i878a80d2330e89d26896388a3f487eef func (m *ApiOverview_domains) SetActions(value []string)() { m.actions = value } +// SetActionsInbound sets the actions_inbound property value. The actions_inbound property +func (m *ApiOverview_domains) SetActionsInbound(value ApiOverview_domains_actions_inboundable)() { + m.actions_inbound = value +} // 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 *ApiOverview_domains) SetAdditionalData(value map[string]any)() { m.additionalData = value @@ -241,12 +268,14 @@ type ApiOverview_domainsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetActions()([]string) + GetActionsInbound()(ApiOverview_domains_actions_inboundable) GetArtifactAttestations()(ApiOverview_domains_artifact_attestationsable) GetCodespaces()([]string) GetCopilot()([]string) GetPackages()([]string) GetWebsite()([]string) SetActions(value []string)() + SetActionsInbound(value ApiOverview_domains_actions_inboundable)() SetArtifactAttestations(value ApiOverview_domains_artifact_attestationsable)() SetCodespaces(value []string)() SetCopilot(value []string)() diff --git a/pkg/github/models/api_overview_escaped_domains_escaped_actions_escaped_inbound.go b/pkg/github/models/api_overview_escaped_domains_escaped_actions_escaped_inbound.go new file mode 100644 index 00000000..68f3d2f2 --- /dev/null +++ b/pkg/github/models/api_overview_escaped_domains_escaped_actions_escaped_inbound.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiOverview_domains_actions_inbound 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 full_domains property + full_domains []string + // The wildcard_domains property + wildcard_domains []string +} +// NewApiOverview_domains_actions_inbound instantiates a new ApiOverview_domains_actions_inbound and sets the default values. +func NewApiOverview_domains_actions_inbound()(*ApiOverview_domains_actions_inbound) { + m := &ApiOverview_domains_actions_inbound{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiOverview_domains_actions_inboundFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiOverview_domains_actions_inboundFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiOverview_domains_actions_inbound(), 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 *ApiOverview_domains_actions_inbound) 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 *ApiOverview_domains_actions_inbound) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["full_domains"] = 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.SetFullDomains(res) + } + return nil + } + res["wildcard_domains"] = 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.SetWildcardDomains(res) + } + return nil + } + return res +} +// GetFullDomains gets the full_domains property value. The full_domains property +// returns a []string when successful +func (m *ApiOverview_domains_actions_inbound) GetFullDomains()([]string) { + return m.full_domains +} +// GetWildcardDomains gets the wildcard_domains property value. The wildcard_domains property +// returns a []string when successful +func (m *ApiOverview_domains_actions_inbound) GetWildcardDomains()([]string) { + return m.wildcard_domains +} +// Serialize serializes information the current object +func (m *ApiOverview_domains_actions_inbound) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFullDomains() != nil { + err := writer.WriteCollectionOfStringValues("full_domains", m.GetFullDomains()) + if err != nil { + return err + } + } + if m.GetWildcardDomains() != nil { + err := writer.WriteCollectionOfStringValues("wildcard_domains", m.GetWildcardDomains()) + 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 *ApiOverview_domains_actions_inbound) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFullDomains sets the full_domains property value. The full_domains property +func (m *ApiOverview_domains_actions_inbound) SetFullDomains(value []string)() { + m.full_domains = value +} +// SetWildcardDomains sets the wildcard_domains property value. The wildcard_domains property +func (m *ApiOverview_domains_actions_inbound) SetWildcardDomains(value []string)() { + m.wildcard_domains = value +} +type ApiOverview_domains_actions_inboundable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFullDomains()([]string) + GetWildcardDomains()([]string) + SetFullDomains(value []string)() + SetWildcardDomains(value []string)() +} diff --git a/pkg/github/models/custom_property.go b/pkg/github/models/custom_property.go index f661f497..0b24478e 100644 --- a/pkg/github/models/custom_property.go +++ b/pkg/github/models/custom_property.go @@ -18,6 +18,8 @@ type CustomProperty struct { property_name *string // Whether the property is required. required *bool + // The source type of the property + source_type *CustomProperty_source_type // The URL that can be used to fetch, update, or delete info about this property via the API. url *string // The type of the value for the property @@ -217,6 +219,16 @@ func (m *CustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["source_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCustomProperty_source_type) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*CustomProperty_source_type)) + } + return nil + } res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -259,6 +271,11 @@ func (m *CustomProperty) GetPropertyName()(*string) { func (m *CustomProperty) GetRequired()(*bool) { return m.required } +// GetSourceType gets the source_type property value. The source type of the property +// returns a *CustomProperty_source_type when successful +func (m *CustomProperty) GetSourceType()(*CustomProperty_source_type) { + return m.source_type +} // GetUrl gets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. // returns a *string when successful func (m *CustomProperty) GetUrl()(*string) { @@ -306,6 +323,13 @@ func (m *CustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err := writer.WriteStringValue("source_type", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("url", m.GetUrl()) if err != nil { @@ -358,6 +382,10 @@ func (m *CustomProperty) SetPropertyName(value *string)() { func (m *CustomProperty) SetRequired(value *bool)() { m.required = value } +// SetSourceType sets the source_type property value. The source type of the property +func (m *CustomProperty) SetSourceType(value *CustomProperty_source_type)() { + m.source_type = value +} // SetUrl sets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. func (m *CustomProperty) SetUrl(value *string)() { m.url = value @@ -378,6 +406,7 @@ type CustomPropertyable interface { GetDescription()(*string) GetPropertyName()(*string) GetRequired()(*bool) + GetSourceType()(*CustomProperty_source_type) GetUrl()(*string) GetValuesEditableBy()(*CustomProperty_values_editable_by) GetValueType()(*CustomProperty_value_type) @@ -386,6 +415,7 @@ type CustomPropertyable interface { SetDescription(value *string)() SetPropertyName(value *string)() SetRequired(value *bool)() + SetSourceType(value *CustomProperty_source_type)() SetUrl(value *string)() SetValuesEditableBy(value *CustomProperty_values_editable_by)() SetValueType(value *CustomProperty_value_type)() diff --git a/pkg/github/models/custom_property_escaped_source_escaped_type.go b/pkg/github/models/custom_property_escaped_source_escaped_type.go new file mode 100644 index 00000000..3b0b9c62 --- /dev/null +++ b/pkg/github/models/custom_property_escaped_source_escaped_type.go @@ -0,0 +1,34 @@ +package models +// The source type of the property +type CustomProperty_source_type int + +const ( + ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE CustomProperty_source_type = iota + ENTERPRISE_CUSTOMPROPERTY_SOURCE_TYPE +) + +func (i CustomProperty_source_type) String() string { + return []string{"organization", "enterprise"}[i] +} +func ParseCustomProperty_source_type(v string) (any, error) { + result := ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE + switch v { + case "organization": + result = ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE + case "enterprise": + result = ENTERPRISE_CUSTOMPROPERTY_SOURCE_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCustomProperty_source_type(values []CustomProperty_source_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CustomProperty_source_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/custom_property_set_payload.go b/pkg/github/models/custom_property_set_payload.go new file mode 100644 index 00000000..324fc9ad --- /dev/null +++ b/pkg/github/models/custom_property_set_payload.go @@ -0,0 +1,304 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomPropertySetPayload custom property set payload +type CustomPropertySetPayload struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // An ordered list of the allowed values of the property.The property can have up to 200 allowed values. + allowed_values []string + // Default value of the property + default_value CustomPropertySetPayload_CustomPropertySetPayload_default_valueable + // Short description of the property + description *string + // Whether the property is required. + required *bool + // The type of the value for the property + value_type *CustomPropertySetPayload_value_type +} +// CustomPropertySetPayload_CustomPropertySetPayload_default_value composed type wrapper for classes string, []string +type CustomPropertySetPayload_CustomPropertySetPayload_default_value struct { + // Composed type representation for type string + customPropertySetPayload_default_valueString *string + // Composed type representation for type []string + string []string +} +// NewCustomPropertySetPayload_CustomPropertySetPayload_default_value instantiates a new CustomPropertySetPayload_CustomPropertySetPayload_default_value and sets the default values. +func NewCustomPropertySetPayload_CustomPropertySetPayload_default_value()(*CustomPropertySetPayload_CustomPropertySetPayload_default_value) { + m := &CustomPropertySetPayload_CustomPropertySetPayload_default_value{ + } + return m +} +// CreateCustomPropertySetPayload_CustomPropertySetPayload_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomPropertySetPayload_CustomPropertySetPayload_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCustomPropertySetPayload_CustomPropertySetPayload_default_value() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + if val, err := parseNode.GetStringValue(); val != nil { + if err != nil { + return nil, err + } + result.SetCustomPropertySetPayloadDefaultValueString(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) + } + return result, nil +} +// GetCustomPropertySetPayloadDefaultValueString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) GetCustomPropertySetPayloadDefaultValueString()(*string) { + return m.customPropertySetPayload_default_valueString +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) GetIsComposedType()(bool) { + return true +} +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) GetString()([]string) { + return m.string +} +// Serialize serializes information the current object +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCustomPropertySetPayloadDefaultValueString() != nil { + err := writer.WriteStringValue("", m.GetCustomPropertySetPayloadDefaultValueString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) + if err != nil { + return err + } + } + return nil +} +// SetCustomPropertySetPayloadDefaultValueString sets the string property value. Composed type representation for type string +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) SetCustomPropertySetPayloadDefaultValueString(value *string)() { + m.customPropertySetPayload_default_valueString = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *CustomPropertySetPayload_CustomPropertySetPayload_default_value) SetString(value []string)() { + m.string = value +} +type CustomPropertySetPayload_CustomPropertySetPayload_default_valueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomPropertySetPayloadDefaultValueString()(*string) + GetString()([]string) + SetCustomPropertySetPayloadDefaultValueString(value *string)() + SetString(value []string)() +} +// NewCustomPropertySetPayload instantiates a new CustomPropertySetPayload and sets the default values. +func NewCustomPropertySetPayload()(*CustomPropertySetPayload) { + m := &CustomPropertySetPayload{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomPropertySetPayloadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomPropertySetPayloadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomPropertySetPayload(), 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 *CustomPropertySetPayload) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowedValues gets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +// returns a []string when successful +func (m *CustomPropertySetPayload) GetAllowedValues()([]string) { + return m.allowed_values +} +// GetDefaultValue gets the default_value property value. Default value of the property +// returns a CustomPropertySetPayload_CustomPropertySetPayload_default_valueable when successful +func (m *CustomPropertySetPayload) GetDefaultValue()(CustomPropertySetPayload_CustomPropertySetPayload_default_valueable) { + return m.default_value +} +// GetDescription gets the description property value. Short description of the property +// returns a *string when successful +func (m *CustomPropertySetPayload) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomPropertySetPayload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + 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.SetAllowedValues(res) + } + return nil + } + res["default_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomPropertySetPayload_CustomPropertySetPayload_default_valueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(CustomPropertySetPayload_CustomPropertySetPayload_default_valueable)) + } + 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["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["value_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCustomPropertySetPayload_value_type) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*CustomPropertySetPayload_value_type)) + } + return nil + } + return res +} +// GetRequired gets the required property value. Whether the property is required. +// returns a *bool when successful +func (m *CustomPropertySetPayload) GetRequired()(*bool) { + return m.required +} +// GetValueType gets the value_type property value. The type of the value for the property +// returns a *CustomPropertySetPayload_value_type when successful +func (m *CustomPropertySetPayload) GetValueType()(*CustomPropertySetPayload_value_type) { + return m.value_type +} +// Serialize serializes information the current object +func (m *CustomPropertySetPayload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedValues() != nil { + err := writer.WriteCollectionOfStringValues("allowed_values", m.GetAllowedValues()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("default_value", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("value_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CustomPropertySetPayload) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowedValues sets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +func (m *CustomPropertySetPayload) SetAllowedValues(value []string)() { + m.allowed_values = value +} +// SetDefaultValue sets the default_value property value. Default value of the property +func (m *CustomPropertySetPayload) SetDefaultValue(value CustomPropertySetPayload_CustomPropertySetPayload_default_valueable)() { + m.default_value = value +} +// SetDescription sets the description property value. Short description of the property +func (m *CustomPropertySetPayload) SetDescription(value *string)() { + m.description = value +} +// SetRequired sets the required property value. Whether the property is required. +func (m *CustomPropertySetPayload) SetRequired(value *bool)() { + m.required = value +} +// SetValueType sets the value_type property value. The type of the value for the property +func (m *CustomPropertySetPayload) SetValueType(value *CustomPropertySetPayload_value_type)() { + m.value_type = value +} +type CustomPropertySetPayloadable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedValues()([]string) + GetDefaultValue()(CustomPropertySetPayload_CustomPropertySetPayload_default_valueable) + GetDescription()(*string) + GetRequired()(*bool) + GetValueType()(*CustomPropertySetPayload_value_type) + SetAllowedValues(value []string)() + SetDefaultValue(value CustomPropertySetPayload_CustomPropertySetPayload_default_valueable)() + SetDescription(value *string)() + SetRequired(value *bool)() + SetValueType(value *CustomPropertySetPayload_value_type)() +} diff --git a/pkg/github/models/custom_property_set_payload_escaped_value_escaped_type.go b/pkg/github/models/custom_property_set_payload_escaped_value_escaped_type.go new file mode 100644 index 00000000..2d70a12e --- /dev/null +++ b/pkg/github/models/custom_property_set_payload_escaped_value_escaped_type.go @@ -0,0 +1,40 @@ +package models +// The type of the value for the property +type CustomPropertySetPayload_value_type int + +const ( + STRING_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE CustomPropertySetPayload_value_type = iota + SINGLE_SELECT_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + MULTI_SELECT_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + TRUE_FALSE_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE +) + +func (i CustomPropertySetPayload_value_type) String() string { + return []string{"string", "single_select", "multi_select", "true_false"}[i] +} +func ParseCustomPropertySetPayload_value_type(v string) (any, error) { + result := STRING_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + switch v { + case "string": + result = STRING_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + case "single_select": + result = SINGLE_SELECT_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_CUSTOMPROPERTYSETPAYLOAD_VALUE_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCustomPropertySetPayload_value_type(values []CustomPropertySetPayload_value_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CustomPropertySetPayload_value_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go index f283a716..7e11f6f6 100644 --- a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go +++ b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go @@ -7,18 +7,20 @@ import ( type DependencyGraphSpdxSbom_sbom struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // An optional comment about the SPDX document. + comment *string // The creationInfo property creationInfo DependencyGraphSpdxSbom_sbom_creationInfoable // The license under which the SPDX document is licensed. dataLicense *string - // The name of the repository that the SPDX document describes. - documentDescribes []string // The namespace for the SPDX document. documentNamespace *string // The name of the SPDX document. name *string // The packages property packages []DependencyGraphSpdxSbom_sbom_packagesable + // The relationships property + relationships []DependencyGraphSpdxSbom_sbom_relationshipsable // The SPDX identifier for the SPDX document. sPDXID *string // The version of the SPDX specification that this document conforms to. @@ -41,6 +43,11 @@ func CreateDependencyGraphSpdxSbom_sbomFromDiscriminatorValue(parseNode i878a80d func (m *DependencyGraphSpdxSbom_sbom) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetComment gets the comment property value. An optional comment about the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetComment()(*string) { + return m.comment +} // GetCreationInfo gets the creationInfo property value. The creationInfo property // returns a DependencyGraphSpdxSbom_sbom_creationInfoable when successful func (m *DependencyGraphSpdxSbom_sbom) GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) { @@ -51,11 +58,6 @@ func (m *DependencyGraphSpdxSbom_sbom) GetCreationInfo()(DependencyGraphSpdxSbom func (m *DependencyGraphSpdxSbom_sbom) GetDataLicense()(*string) { return m.dataLicense } -// GetDocumentDescribes gets the documentDescribes property value. The name of the repository that the SPDX document describes. -// returns a []string when successful -func (m *DependencyGraphSpdxSbom_sbom) GetDocumentDescribes()([]string) { - return m.documentDescribes -} // GetDocumentNamespace gets the documentNamespace property value. The namespace for the SPDX document. // returns a *string when successful func (m *DependencyGraphSpdxSbom_sbom) GetDocumentNamespace()(*string) { @@ -65,39 +67,33 @@ func (m *DependencyGraphSpdxSbom_sbom) GetDocumentNamespace()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DependencyGraphSpdxSbom_sbom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["creationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() if err != nil { return err } if val != nil { - m.SetCreationInfo(val.(DependencyGraphSpdxSbom_sbom_creationInfoable)) + m.SetComment(val) } return nil } - res["dataLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() + res["creationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetDataLicense(val) + m.SetCreationInfo(val.(DependencyGraphSpdxSbom_sbom_creationInfoable)) } return nil } - res["documentDescribes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["dataLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() 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.SetDocumentDescribes(res) + m.SetDataLicense(val) } return nil } @@ -137,6 +133,22 @@ func (m *DependencyGraphSpdxSbom_sbom) GetFieldDeserializers()(map[string]func(i } return nil } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependencyGraphSpdxSbom_sbom_relationshipsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependencyGraphSpdxSbom_sbom_relationshipsable) + } + } + m.SetRelationships(res) + } + return nil + } res["SPDXID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -169,6 +181,11 @@ func (m *DependencyGraphSpdxSbom_sbom) GetName()(*string) { func (m *DependencyGraphSpdxSbom_sbom) GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) { return m.packages } +// GetRelationships gets the relationships property value. The relationships property +// returns a []DependencyGraphSpdxSbom_sbom_relationshipsable when successful +func (m *DependencyGraphSpdxSbom_sbom) GetRelationships()([]DependencyGraphSpdxSbom_sbom_relationshipsable) { + return m.relationships +} // GetSPDXID gets the SPDXID property value. The SPDX identifier for the SPDX document. // returns a *string when successful func (m *DependencyGraphSpdxSbom_sbom) GetSPDXID()(*string) { @@ -182,19 +199,19 @@ func (m *DependencyGraphSpdxSbom_sbom) GetSpdxVersion()(*string) { // Serialize serializes information the current object func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { - err := writer.WriteObjectValue("creationInfo", m.GetCreationInfo()) + err := writer.WriteStringValue("comment", m.GetComment()) if err != nil { return err } } { - err := writer.WriteStringValue("dataLicense", m.GetDataLicense()) + err := writer.WriteObjectValue("creationInfo", m.GetCreationInfo()) if err != nil { return err } } - if m.GetDocumentDescribes() != nil { - err := writer.WriteCollectionOfStringValues("documentDescribes", m.GetDocumentDescribes()) + { + err := writer.WriteStringValue("dataLicense", m.GetDataLicense()) if err != nil { return err } @@ -223,6 +240,18 @@ func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388 return err } } + if m.GetRelationships() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelationships())) + for i, v := range m.GetRelationships() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("relationships", cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("SPDXID", m.GetSPDXID()) if err != nil { @@ -247,6 +276,10 @@ func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388 func (m *DependencyGraphSpdxSbom_sbom) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetComment sets the comment property value. An optional comment about the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom) SetComment(value *string)() { + m.comment = value +} // SetCreationInfo sets the creationInfo property value. The creationInfo property func (m *DependencyGraphSpdxSbom_sbom) SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() { m.creationInfo = value @@ -255,10 +288,6 @@ func (m *DependencyGraphSpdxSbom_sbom) SetCreationInfo(value DependencyGraphSpdx func (m *DependencyGraphSpdxSbom_sbom) SetDataLicense(value *string)() { m.dataLicense = value } -// SetDocumentDescribes sets the documentDescribes property value. The name of the repository that the SPDX document describes. -func (m *DependencyGraphSpdxSbom_sbom) SetDocumentDescribes(value []string)() { - m.documentDescribes = value -} // SetDocumentNamespace sets the documentNamespace property value. The namespace for the SPDX document. func (m *DependencyGraphSpdxSbom_sbom) SetDocumentNamespace(value *string)() { m.documentNamespace = value @@ -271,6 +300,10 @@ func (m *DependencyGraphSpdxSbom_sbom) SetName(value *string)() { func (m *DependencyGraphSpdxSbom_sbom) SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() { m.packages = value } +// SetRelationships sets the relationships property value. The relationships property +func (m *DependencyGraphSpdxSbom_sbom) SetRelationships(value []DependencyGraphSpdxSbom_sbom_relationshipsable)() { + m.relationships = value +} // SetSPDXID sets the SPDXID property value. The SPDX identifier for the SPDX document. func (m *DependencyGraphSpdxSbom_sbom) SetSPDXID(value *string)() { m.sPDXID = value @@ -282,20 +315,22 @@ func (m *DependencyGraphSpdxSbom_sbom) SetSpdxVersion(value *string)() { type DependencyGraphSpdxSbom_sbomable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) GetDataLicense()(*string) - GetDocumentDescribes()([]string) GetDocumentNamespace()(*string) GetName()(*string) GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) + GetRelationships()([]DependencyGraphSpdxSbom_sbom_relationshipsable) GetSPDXID()(*string) GetSpdxVersion()(*string) + SetComment(value *string)() SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() SetDataLicense(value *string)() - SetDocumentDescribes(value []string)() SetDocumentNamespace(value *string)() SetName(value *string)() SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() + SetRelationships(value []DependencyGraphSpdxSbom_sbom_relationshipsable)() SetSPDXID(value *string)() SetSpdxVersion(value *string)() } diff --git a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go new file mode 100644 index 00000000..c95207b5 --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom_relationships 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 SPDX identifier of the package that is the target of the relationship. + relatedSpdxElement *string + // The type of relationship between the two SPDX elements. + relationshipType *string + // The SPDX identifier of the package that is the source of the relationship. + spdxElementId *string +} +// NewDependencyGraphSpdxSbom_sbom_relationships instantiates a new DependencyGraphSpdxSbom_sbom_relationships and sets the default values. +func NewDependencyGraphSpdxSbom_sbom_relationships()(*DependencyGraphSpdxSbom_sbom_relationships) { + m := &DependencyGraphSpdxSbom_sbom_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom_relationships(), 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 *DependencyGraphSpdxSbom_sbom_relationships) 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 *DependencyGraphSpdxSbom_sbom_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["relatedSpdxElement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelatedSpdxElement(val) + } + return nil + } + res["relationshipType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelationshipType(val) + } + return nil + } + res["spdxElementId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxElementId(val) + } + return nil + } + return res +} +// GetRelatedSpdxElement gets the relatedSpdxElement property value. The SPDX identifier of the package that is the target of the relationship. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetRelatedSpdxElement()(*string) { + return m.relatedSpdxElement +} +// GetRelationshipType gets the relationshipType property value. The type of relationship between the two SPDX elements. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetRelationshipType()(*string) { + return m.relationshipType +} +// GetSpdxElementId gets the spdxElementId property value. The SPDX identifier of the package that is the source of the relationship. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetSpdxElementId()(*string) { + return m.spdxElementId +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("relatedSpdxElement", m.GetRelatedSpdxElement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relationshipType", m.GetRelationshipType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdxElementId", m.GetSpdxElementId()) + 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 *DependencyGraphSpdxSbom_sbom_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRelatedSpdxElement sets the relatedSpdxElement property value. The SPDX identifier of the package that is the target of the relationship. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetRelatedSpdxElement(value *string)() { + m.relatedSpdxElement = value +} +// SetRelationshipType sets the relationshipType property value. The type of relationship between the two SPDX elements. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetRelationshipType(value *string)() { + m.relationshipType = value +} +// SetSpdxElementId sets the spdxElementId property value. The SPDX identifier of the package that is the source of the relationship. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetSpdxElementId(value *string)() { + m.spdxElementId = value +} +type DependencyGraphSpdxSbom_sbom_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRelatedSpdxElement()(*string) + GetRelationshipType()(*string) + GetSpdxElementId()(*string) + SetRelatedSpdxElement(value *string)() + SetRelationshipType(value *string)() + SetSpdxElementId(value *string)() +} diff --git a/pkg/github/models/issue.go b/pkg/github/models/issue.go index 465c7bb2..b561598e 100644 --- a/pkg/github/models/issue.go +++ b/pkg/github/models/issue.go @@ -67,6 +67,8 @@ type Issue struct { state *string // The reason for the current state state_reason *Issue_state_reason + // The sub_issues_summary property + sub_issues_summary SubIssuesSummaryable // The timeline_url property timeline_url *string // Title of the issue @@ -471,6 +473,16 @@ func (m *Issue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388 } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubIssuesSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(SubIssuesSummaryable)) + } + return nil + } res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -598,6 +610,11 @@ func (m *Issue) GetState()(*string) { func (m *Issue) GetStateReason()(*Issue_state_reason) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a SubIssuesSummaryable when successful +func (m *Issue) GetSubIssuesSummary()(SubIssuesSummaryable) { + return m.sub_issues_summary +} // GetTimelineUrl gets the timeline_url property value. The timeline_url property // returns a *string when successful func (m *Issue) GetTimelineUrl()(*string) { @@ -807,6 +824,12 @@ func (m *Issue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) if err != nil { @@ -965,6 +988,10 @@ func (m *Issue) SetState(value *string)() { func (m *Issue) SetStateReason(value *Issue_state_reason)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *Issue) SetSubIssuesSummary(value SubIssuesSummaryable)() { + m.sub_issues_summary = value +} // SetTimelineUrl sets the timeline_url property value. The timeline_url property func (m *Issue) SetTimelineUrl(value *string)() { m.timeline_url = value @@ -1017,6 +1044,7 @@ type Issueable interface { GetRepositoryUrl()(*string) GetState()(*string) GetStateReason()(*Issue_state_reason) + GetSubIssuesSummary()(SubIssuesSummaryable) GetTimelineUrl()(*string) GetTitle()(*string) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -1051,6 +1079,7 @@ type Issueable interface { SetRepositoryUrl(value *string)() SetState(value *string)() SetStateReason(value *Issue_state_reason)() + SetSubIssuesSummary(value SubIssuesSummaryable)() SetTimelineUrl(value *string)() SetTitle(value *string)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/issue_search_result_item.go b/pkg/github/models/issue_search_result_item.go index bb48360b..8c177135 100644 --- a/pkg/github/models/issue_search_result_item.go +++ b/pkg/github/models/issue_search_result_item.go @@ -67,6 +67,8 @@ type IssueSearchResultItem struct { state *string // The state_reason property state_reason *string + // The sub_issues_summary property + sub_issues_summary IssueSearchResultItem_sub_issues_summaryable // The text_matches property text_matches []Issuesable // The timeline_url property @@ -468,6 +470,16 @@ func (m *IssueSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(IssueSearchResultItem_sub_issues_summaryable)) + } + return nil + } res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateIssuesFromDiscriminatorValue) if err != nil { @@ -616,6 +628,11 @@ func (m *IssueSearchResultItem) GetState()(*string) { func (m *IssueSearchResultItem) GetStateReason()(*string) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a IssueSearchResultItem_sub_issues_summaryable when successful +func (m *IssueSearchResultItem) GetSubIssuesSummary()(IssueSearchResultItem_sub_issues_summaryable) { + return m.sub_issues_summary +} // GetTextMatches gets the text_matches property value. The text_matches property // returns a []Issuesable when successful func (m *IssueSearchResultItem) GetTextMatches()([]Issuesable) { @@ -835,6 +852,12 @@ func (m *IssueSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } if m.GetTextMatches() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) for i, v := range m.GetTextMatches() { @@ -1005,6 +1028,10 @@ func (m *IssueSearchResultItem) SetState(value *string)() { func (m *IssueSearchResultItem) SetStateReason(value *string)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *IssueSearchResultItem) SetSubIssuesSummary(value IssueSearchResultItem_sub_issues_summaryable)() { + m.sub_issues_summary = value +} // SetTextMatches sets the text_matches property value. The text_matches property func (m *IssueSearchResultItem) SetTextMatches(value []Issuesable)() { m.text_matches = value @@ -1061,6 +1088,7 @@ type IssueSearchResultItemable interface { GetScore()(*float64) GetState()(*string) GetStateReason()(*string) + GetSubIssuesSummary()(IssueSearchResultItem_sub_issues_summaryable) GetTextMatches()([]Issuesable) GetTimelineUrl()(*string) GetTitle()(*string) @@ -1096,6 +1124,7 @@ type IssueSearchResultItemable interface { SetScore(value *float64)() SetState(value *string)() SetStateReason(value *string)() + SetSubIssuesSummary(value IssueSearchResultItem_sub_issues_summaryable)() SetTextMatches(value []Issuesable)() SetTimelineUrl(value *string)() SetTitle(value *string)() diff --git a/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go b/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go new file mode 100644 index 00000000..0e2a5c07 --- /dev/null +++ b/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IssueSearchResultItem_sub_issues_summary 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 completed property + completed *int32 + // The percent_completed property + percent_completed *int32 + // The total property + total *int32 +} +// NewIssueSearchResultItem_sub_issues_summary instantiates a new IssueSearchResultItem_sub_issues_summary and sets the default values. +func NewIssueSearchResultItem_sub_issues_summary()(*IssueSearchResultItem_sub_issues_summary) { + m := &IssueSearchResultItem_sub_issues_summary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueSearchResultItem_sub_issues_summary(), 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 *IssueSearchResultItem_sub_issues_summary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompleted gets the completed property value. The completed property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetCompleted()(*int32) { + return m.completed +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleted(val) + } + return nil + } + res["percent_completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentCompleted(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetPercentCompleted gets the percent_completed property value. The percent_completed property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetPercentCompleted()(*int32) { + return m.percent_completed +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *IssueSearchResultItem_sub_issues_summary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("completed", m.GetCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("percent_completed", m.GetPercentCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + 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 *IssueSearchResultItem_sub_issues_summary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompleted sets the completed property value. The completed property +func (m *IssueSearchResultItem_sub_issues_summary) SetCompleted(value *int32)() { + m.completed = value +} +// SetPercentCompleted sets the percent_completed property value. The percent_completed property +func (m *IssueSearchResultItem_sub_issues_summary) SetPercentCompleted(value *int32)() { + m.percent_completed = value +} +// SetTotal sets the total property value. The total property +func (m *IssueSearchResultItem_sub_issues_summary) SetTotal(value *int32)() { + m.total = value +} +type IssueSearchResultItem_sub_issues_summaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompleted()(*int32) + GetPercentCompleted()(*int32) + GetTotal()(*int32) + SetCompleted(value *int32)() + SetPercentCompleted(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/nullable_issue.go b/pkg/github/models/nullable_issue.go index 8eb356a5..c109f518 100644 --- a/pkg/github/models/nullable_issue.go +++ b/pkg/github/models/nullable_issue.go @@ -67,6 +67,8 @@ type NullableIssue struct { state *string // The reason for the current state state_reason *NullableIssue_state_reason + // The sub_issues_summary property + sub_issues_summary SubIssuesSummaryable // The timeline_url property timeline_url *string // Title of the issue @@ -471,6 +473,16 @@ func (m *NullableIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubIssuesSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(SubIssuesSummaryable)) + } + return nil + } res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -598,6 +610,11 @@ func (m *NullableIssue) GetState()(*string) { func (m *NullableIssue) GetStateReason()(*NullableIssue_state_reason) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a SubIssuesSummaryable when successful +func (m *NullableIssue) GetSubIssuesSummary()(SubIssuesSummaryable) { + return m.sub_issues_summary +} // GetTimelineUrl gets the timeline_url property value. The timeline_url property // returns a *string when successful func (m *NullableIssue) GetTimelineUrl()(*string) { @@ -807,6 +824,12 @@ func (m *NullableIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) if err != nil { @@ -965,6 +988,10 @@ func (m *NullableIssue) SetState(value *string)() { func (m *NullableIssue) SetStateReason(value *NullableIssue_state_reason)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *NullableIssue) SetSubIssuesSummary(value SubIssuesSummaryable)() { + m.sub_issues_summary = value +} // SetTimelineUrl sets the timeline_url property value. The timeline_url property func (m *NullableIssue) SetTimelineUrl(value *string)() { m.timeline_url = value @@ -1017,6 +1044,7 @@ type NullableIssueable interface { GetRepositoryUrl()(*string) GetState()(*string) GetStateReason()(*NullableIssue_state_reason) + GetSubIssuesSummary()(SubIssuesSummaryable) GetTimelineUrl()(*string) GetTitle()(*string) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -1051,6 +1079,7 @@ type NullableIssueable interface { SetRepositoryUrl(value *string)() SetState(value *string)() SetStateReason(value *NullableIssue_state_reason)() + SetSubIssuesSummary(value SubIssuesSummaryable)() SetTimelineUrl(value *string)() SetTitle(value *string)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/organization_programmatic_access_grant.go b/pkg/github/models/organization_programmatic_access_grant.go index cd0c9249..ffb92c07 100644 --- a/pkg/github/models/organization_programmatic_access_grant.go +++ b/pkg/github/models/organization_programmatic_access_grant.go @@ -28,6 +28,8 @@ type OrganizationProgrammaticAccessGrant struct { token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string + // The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + token_name *string } // NewOrganizationProgrammaticAccessGrant instantiates a new OrganizationProgrammaticAccessGrant and sets the default values. func NewOrganizationProgrammaticAccessGrant()(*OrganizationProgrammaticAccessGrant) { @@ -155,6 +157,16 @@ func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string } return nil } + res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenName(val) + } + return nil + } return res } // GetId gets the id property value. Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. @@ -202,6 +214,11 @@ func (m *OrganizationProgrammaticAccessGrant) GetTokenId()(*int32) { func (m *OrganizationProgrammaticAccessGrant) GetTokenLastUsedAt()(*string) { return m.token_last_used_at } +// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenName()(*string) { + return m.token_name +} // Serialize serializes information the current object func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -265,6 +282,12 @@ func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d2 return err } } + { + err := writer.WriteStringValue("token_name", m.GetTokenName()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -317,6 +340,10 @@ func (m *OrganizationProgrammaticAccessGrant) SetTokenId(value *int32)() { func (m *OrganizationProgrammaticAccessGrant) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value } +// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +func (m *OrganizationProgrammaticAccessGrant) SetTokenName(value *string)() { + m.token_name = value +} type OrganizationProgrammaticAccessGrantable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -330,6 +357,7 @@ type OrganizationProgrammaticAccessGrantable interface { GetTokenExpiresAt()(*string) GetTokenId()(*int32) GetTokenLastUsedAt()(*string) + GetTokenName()(*string) SetAccessGrantedAt(value *string)() SetId(value *int32)() SetOwner(value SimpleUserable)() @@ -340,4 +368,5 @@ type OrganizationProgrammaticAccessGrantable interface { SetTokenExpiresAt(value *string)() SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() + SetTokenName(value *string)() } diff --git a/pkg/github/models/organization_programmatic_access_grant_request.go b/pkg/github/models/organization_programmatic_access_grant_request.go index 787b8837..06911446 100644 --- a/pkg/github/models/organization_programmatic_access_grant_request.go +++ b/pkg/github/models/organization_programmatic_access_grant_request.go @@ -30,6 +30,8 @@ type OrganizationProgrammaticAccessGrantRequest struct { token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string + // The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + token_name *string } // NewOrganizationProgrammaticAccessGrantRequest instantiates a new OrganizationProgrammaticAccessGrantRequest and sets the default values. func NewOrganizationProgrammaticAccessGrantRequest()(*OrganizationProgrammaticAccessGrantRequest) { @@ -167,6 +169,16 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetFieldDeserializers()(map } return nil } + res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenName(val) + } + return nil + } return res } // GetId gets the id property value. Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. @@ -219,6 +231,11 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenId()(*int32) { func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenLastUsedAt()(*string) { return m.token_last_used_at } +// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenName()(*string) { + return m.token_name +} // Serialize serializes information the current object func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -288,6 +305,12 @@ func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d23 return err } } + { + err := writer.WriteStringValue("token_name", m.GetTokenName()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -344,6 +367,10 @@ func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenId(value *int32)() func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value } +// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenName(value *string)() { + m.token_name = value +} type OrganizationProgrammaticAccessGrantRequestable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -358,6 +385,7 @@ type OrganizationProgrammaticAccessGrantRequestable interface { GetTokenExpiresAt()(*string) GetTokenId()(*int32) GetTokenLastUsedAt()(*string) + GetTokenName()(*string) SetCreatedAt(value *string)() SetId(value *int32)() SetOwner(value SimpleUserable)() @@ -369,4 +397,5 @@ type OrganizationProgrammaticAccessGrantRequestable interface { SetTokenExpiresAt(value *string)() SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() + SetTokenName(value *string)() } diff --git a/pkg/github/models/organization_role.go b/pkg/github/models/organization_role.go index db45a281..4e84422b 100644 --- a/pkg/github/models/organization_role.go +++ b/pkg/github/models/organization_role.go @@ -9,6 +9,8 @@ import ( type OrganizationRole 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 system role from which this role inherits permissions. + base_role *OrganizationRole_base_role // The date and time the role was created. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // A short description about who this role is for or what permissions it grants. @@ -21,6 +23,8 @@ type OrganizationRole struct { organization NullableSimpleUserable // A list of permissions included in this role. permissions []string + // Source answers the question, "where did this role come from?" + source *OrganizationRole_source // The date and time the role was last updated. updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time } @@ -41,6 +45,11 @@ func CreateOrganizationRoleFromDiscriminatorValue(parseNode i878a80d2330e89d2689 func (m *OrganizationRole) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetBaseRole gets the base_role property value. The system role from which this role inherits permissions. +// returns a *OrganizationRole_base_role when successful +func (m *OrganizationRole) GetBaseRole()(*OrganizationRole_base_role) { + return m.base_role +} // GetCreatedAt gets the created_at property value. The date and time the role was created. // returns a *Time when successful func (m *OrganizationRole) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -55,6 +64,16 @@ func (m *OrganizationRole) GetDescription()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationRole_base_role) + if err != nil { + return err + } + if val != nil { + m.SetBaseRole(val.(*OrganizationRole_base_role)) + } + return nil + } res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -121,6 +140,16 @@ func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationRole_source) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*OrganizationRole_source)) + } + return nil + } res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -153,6 +182,11 @@ func (m *OrganizationRole) GetOrganization()(NullableSimpleUserable) { func (m *OrganizationRole) GetPermissions()([]string) { return m.permissions } +// GetSource gets the source property value. Source answers the question, "where did this role come from?" +// returns a *OrganizationRole_source when successful +func (m *OrganizationRole) GetSource()(*OrganizationRole_source) { + return m.source +} // GetUpdatedAt gets the updated_at property value. The date and time the role was last updated. // returns a *Time when successful func (m *OrganizationRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -160,6 +194,13 @@ func (m *OrganizationRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3 } // Serialize serializes information the current object func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseRole() != nil { + cast := (*m.GetBaseRole()).String() + err := writer.WriteStringValue("base_role", &cast) + if err != nil { + return err + } + } { err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) if err != nil { @@ -196,6 +237,13 @@ func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err := writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } { err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) if err != nil { @@ -214,6 +262,10 @@ func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b func (m *OrganizationRole) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetBaseRole sets the base_role property value. The system role from which this role inherits permissions. +func (m *OrganizationRole) SetBaseRole(value *OrganizationRole_base_role)() { + m.base_role = value +} // SetCreatedAt sets the created_at property value. The date and time the role was created. func (m *OrganizationRole) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value @@ -238,6 +290,10 @@ func (m *OrganizationRole) SetOrganization(value NullableSimpleUserable)() { func (m *OrganizationRole) SetPermissions(value []string)() { m.permissions = value } +// SetSource sets the source property value. Source answers the question, "where did this role come from?" +func (m *OrganizationRole) SetSource(value *OrganizationRole_source)() { + m.source = value +} // SetUpdatedAt sets the updated_at property value. The date and time the role was last updated. func (m *OrganizationRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.updated_at = value @@ -245,18 +301,22 @@ func (m *OrganizationRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6 type OrganizationRoleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseRole()(*OrganizationRole_base_role) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDescription()(*string) GetId()(*int64) GetName()(*string) GetOrganization()(NullableSimpleUserable) GetPermissions()([]string) + GetSource()(*OrganizationRole_source) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBaseRole(value *OrganizationRole_base_role)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDescription(value *string)() SetId(value *int64)() SetName(value *string)() SetOrganization(value NullableSimpleUserable)() SetPermissions(value []string)() + SetSource(value *OrganizationRole_source)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() } diff --git a/pkg/github/models/organization_role_escaped_base_escaped_role.go b/pkg/github/models/organization_role_escaped_base_escaped_role.go new file mode 100644 index 00000000..951af6f8 --- /dev/null +++ b/pkg/github/models/organization_role_escaped_base_escaped_role.go @@ -0,0 +1,43 @@ +package models +// The system role from which this role inherits permissions. +type OrganizationRole_base_role int + +const ( + READ_ORGANIZATIONROLE_BASE_ROLE OrganizationRole_base_role = iota + TRIAGE_ORGANIZATIONROLE_BASE_ROLE + WRITE_ORGANIZATIONROLE_BASE_ROLE + MAINTAIN_ORGANIZATIONROLE_BASE_ROLE + ADMIN_ORGANIZATIONROLE_BASE_ROLE +) + +func (i OrganizationRole_base_role) String() string { + return []string{"read", "triage", "write", "maintain", "admin"}[i] +} +func ParseOrganizationRole_base_role(v string) (any, error) { + result := READ_ORGANIZATIONROLE_BASE_ROLE + switch v { + case "read": + result = READ_ORGANIZATIONROLE_BASE_ROLE + case "triage": + result = TRIAGE_ORGANIZATIONROLE_BASE_ROLE + case "write": + result = WRITE_ORGANIZATIONROLE_BASE_ROLE + case "maintain": + result = MAINTAIN_ORGANIZATIONROLE_BASE_ROLE + case "admin": + result = ADMIN_ORGANIZATIONROLE_BASE_ROLE + default: + return nil, nil + } + return &result, nil +} +func SerializeOrganizationRole_base_role(values []OrganizationRole_base_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationRole_base_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_role_escaped_source.go b/pkg/github/models/organization_role_escaped_source.go new file mode 100644 index 00000000..380c1968 --- /dev/null +++ b/pkg/github/models/organization_role_escaped_source.go @@ -0,0 +1,37 @@ +package models +// Source answers the question, "where did this role come from?" +type OrganizationRole_source int + +const ( + ORGANIZATION_ORGANIZATIONROLE_SOURCE OrganizationRole_source = iota + ENTERPRISE_ORGANIZATIONROLE_SOURCE + PREDEFINED_ORGANIZATIONROLE_SOURCE +) + +func (i OrganizationRole_source) String() string { + return []string{"Organization", "Enterprise", "Predefined"}[i] +} +func ParseOrganizationRole_source(v string) (any, error) { + result := ORGANIZATION_ORGANIZATIONROLE_SOURCE + switch v { + case "Organization": + result = ORGANIZATION_ORGANIZATIONROLE_SOURCE + case "Enterprise": + result = ENTERPRISE_ORGANIZATIONROLE_SOURCE + case "Predefined": + result = PREDEFINED_ORGANIZATIONROLE_SOURCE + default: + return nil, nil + } + return &result, nil +} +func SerializeOrganizationRole_source(values []OrganizationRole_source) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationRole_source) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/rate_limit_overview_escaped_resources.go b/pkg/github/models/rate_limit_overview_escaped_resources.go index d0c58239..f9a6b3ec 100644 --- a/pkg/github/models/rate_limit_overview_escaped_resources.go +++ b/pkg/github/models/rate_limit_overview_escaped_resources.go @@ -9,6 +9,8 @@ type RateLimitOverview_resources struct { actions_runner_registration RateLimitable // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // The code_scanning_autofix property + code_scanning_autofix RateLimitable // The code_scanning_upload property code_scanning_upload RateLimitable // The code_search property @@ -48,6 +50,11 @@ func (m *RateLimitOverview_resources) GetActionsRunnerRegistration()(RateLimitab func (m *RateLimitOverview_resources) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetCodeScanningAutofix gets the code_scanning_autofix property value. The code_scanning_autofix property +// returns a RateLimitable when successful +func (m *RateLimitOverview_resources) GetCodeScanningAutofix()(RateLimitable) { + return m.code_scanning_autofix +} // GetCodeScanningUpload gets the code_scanning_upload property value. The code_scanning_upload property // returns a RateLimitable when successful func (m *RateLimitOverview_resources) GetCodeScanningUpload()(RateLimitable) { @@ -77,6 +84,16 @@ func (m *RateLimitOverview_resources) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["code_scanning_autofix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningAutofix(val.(RateLimitable)) + } + return nil + } res["code_scanning_upload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateRateLimitFromDiscriminatorValue) if err != nil { @@ -192,6 +209,12 @@ func (m *RateLimitOverview_resources) Serialize(writer i878a80d2330e89d26896388a return err } } + { + err := writer.WriteObjectValue("code_scanning_autofix", m.GetCodeScanningAutofix()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("code_scanning_upload", m.GetCodeScanningUpload()) if err != nil { @@ -256,6 +279,10 @@ func (m *RateLimitOverview_resources) SetActionsRunnerRegistration(value RateLim func (m *RateLimitOverview_resources) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetCodeScanningAutofix sets the code_scanning_autofix property value. The code_scanning_autofix property +func (m *RateLimitOverview_resources) SetCodeScanningAutofix(value RateLimitable)() { + m.code_scanning_autofix = value +} // SetCodeScanningUpload sets the code_scanning_upload property value. The code_scanning_upload property func (m *RateLimitOverview_resources) SetCodeScanningUpload(value RateLimitable)() { m.code_scanning_upload = value @@ -292,6 +319,7 @@ type RateLimitOverview_resourcesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetActionsRunnerRegistration()(RateLimitable) + GetCodeScanningAutofix()(RateLimitable) GetCodeScanningUpload()(RateLimitable) GetCodeSearch()(RateLimitable) GetCore()(RateLimitable) @@ -301,6 +329,7 @@ type RateLimitOverview_resourcesable interface { GetSearch()(RateLimitable) GetSourceImport()(RateLimitable) SetActionsRunnerRegistration(value RateLimitable)() + SetCodeScanningAutofix(value RateLimitable)() SetCodeScanningUpload(value RateLimitable)() SetCodeSearch(value RateLimitable)() SetCore(value RateLimitable)() diff --git a/pkg/github/models/repository_rule_enforcement.go b/pkg/github/models/repository_rule_enforcement.go index 49cddd7b..71da67be 100644 --- a/pkg/github/models/repository_rule_enforcement.go +++ b/pkg/github/models/repository_rule_enforcement.go @@ -1,5 +1,5 @@ package models -// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. type RepositoryRuleEnforcement int const ( diff --git a/pkg/github/models/repository_rule_pull_request_escaped_parameters.go b/pkg/github/models/repository_rule_pull_request_escaped_parameters.go index 97253253..19b2046f 100644 --- a/pkg/github/models/repository_rule_pull_request_escaped_parameters.go +++ b/pkg/github/models/repository_rule_pull_request_escaped_parameters.go @@ -7,6 +7,8 @@ import ( type RepositoryRulePullRequest_parameters struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. + allowed_merge_methods []string // New, reviewable commits pushed will dismiss previous pull request review approvals. dismiss_stale_reviews_on_push *bool // Require an approving review in pull requests that modify files that have a designated code owner. @@ -35,6 +37,11 @@ func CreateRepositoryRulePullRequest_parametersFromDiscriminatorValue(parseNode func (m *RepositoryRulePullRequest_parameters) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetAllowedMergeMethods gets the allowed_merge_methods property value. When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. +// returns a []string when successful +func (m *RepositoryRulePullRequest_parameters) GetAllowedMergeMethods()([]string) { + return m.allowed_merge_methods +} // GetDismissStaleReviewsOnPush gets the dismiss_stale_reviews_on_push property value. New, reviewable commits pushed will dismiss previous pull request review approvals. // returns a *bool when successful func (m *RepositoryRulePullRequest_parameters) GetDismissStaleReviewsOnPush()(*bool) { @@ -44,6 +51,22 @@ func (m *RepositoryRulePullRequest_parameters) GetDismissStaleReviewsOnPush()(*b // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *RepositoryRulePullRequest_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed_merge_methods"] = 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.SetAllowedMergeMethods(res) + } + return nil + } res["dismiss_stale_reviews_on_push"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -118,6 +141,12 @@ func (m *RepositoryRulePullRequest_parameters) GetRequireLastPushApproval()(*boo } // Serialize serializes information the current object func (m *RepositoryRulePullRequest_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedMergeMethods() != nil { + err := writer.WriteCollectionOfStringValues("allowed_merge_methods", m.GetAllowedMergeMethods()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("dismiss_stale_reviews_on_push", m.GetDismissStaleReviewsOnPush()) if err != nil { @@ -160,6 +189,10 @@ func (m *RepositoryRulePullRequest_parameters) Serialize(writer i878a80d2330e89d func (m *RepositoryRulePullRequest_parameters) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetAllowedMergeMethods sets the allowed_merge_methods property value. When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. +func (m *RepositoryRulePullRequest_parameters) SetAllowedMergeMethods(value []string)() { + m.allowed_merge_methods = value +} // SetDismissStaleReviewsOnPush sets the dismiss_stale_reviews_on_push property value. New, reviewable commits pushed will dismiss previous pull request review approvals. func (m *RepositoryRulePullRequest_parameters) SetDismissStaleReviewsOnPush(value *bool)() { m.dismiss_stale_reviews_on_push = value @@ -183,11 +216,13 @@ func (m *RepositoryRulePullRequest_parameters) SetRequireLastPushApproval(value type RepositoryRulePullRequest_parametersable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedMergeMethods()([]string) GetDismissStaleReviewsOnPush()(*bool) GetRequireCodeOwnerReview()(*bool) GetRequiredApprovingReviewCount()(*int32) GetRequiredReviewThreadResolution()(*bool) GetRequireLastPushApproval()(*bool) + SetAllowedMergeMethods(value []string)() SetDismissStaleReviewsOnPush(value *bool)() SetRequireCodeOwnerReview(value *bool)() SetRequiredApprovingReviewCount(value *int32)() diff --git a/pkg/github/models/repository_ruleset.go b/pkg/github/models/repository_ruleset.go index e117fd6b..25183219 100644 --- a/pkg/github/models/repository_ruleset.go +++ b/pkg/github/models/repository_ruleset.go @@ -19,7 +19,7 @@ type RepositoryRuleset struct { created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. current_user_can_bypass *RepositoryRuleset_current_user_can_bypass - // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. enforcement *RepositoryRuleEnforcement // The ID of the ruleset id *int32 @@ -33,7 +33,7 @@ type RepositoryRuleset struct { source *string // The type of the source of the ruleset source_type *RepositoryRuleset_source_type - // The target of the ruleset + // The target of the ruleset. target *RepositoryRuleset_target // The updated_at property updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time @@ -161,7 +161,7 @@ func (m *RepositoryRuleset) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f func (m *RepositoryRuleset) GetCurrentUserCanBypass()(*RepositoryRuleset_current_user_can_bypass) { return m.current_user_can_bypass } -// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. // returns a *RepositoryRuleEnforcement when successful func (m *RepositoryRuleset) GetEnforcement()(*RepositoryRuleEnforcement) { return m.enforcement @@ -359,7 +359,7 @@ func (m *RepositoryRuleset) GetSource()(*string) { func (m *RepositoryRuleset) GetSourceType()(*RepositoryRuleset_source_type) { return m.source_type } -// GetTarget gets the target property value. The target of the ruleset +// GetTarget gets the target property value. The target of the ruleset. // returns a *RepositoryRuleset_target when successful func (m *RepositoryRuleset) GetTarget()(*RepositoryRuleset_target) { return m.target @@ -499,7 +499,7 @@ func (m *RepositoryRuleset) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a func (m *RepositoryRuleset) SetCurrentUserCanBypass(value *RepositoryRuleset_current_user_can_bypass)() { m.current_user_can_bypass = value } -// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. func (m *RepositoryRuleset) SetEnforcement(value *RepositoryRuleEnforcement)() { m.enforcement = value } @@ -531,7 +531,7 @@ func (m *RepositoryRuleset) SetSource(value *string)() { func (m *RepositoryRuleset) SetSourceType(value *RepositoryRuleset_source_type)() { m.source_type = value } -// SetTarget sets the target property value. The target of the ruleset +// SetTarget sets the target property value. The target of the ruleset. func (m *RepositoryRuleset) SetTarget(value *RepositoryRuleset_target)() { m.target = value } diff --git a/pkg/github/models/repository_ruleset_escaped_target.go b/pkg/github/models/repository_ruleset_escaped_target.go index ea036dc8..9e2b0000 100644 --- a/pkg/github/models/repository_ruleset_escaped_target.go +++ b/pkg/github/models/repository_ruleset_escaped_target.go @@ -1,5 +1,5 @@ package models -// The target of the ruleset +// The target of the ruleset. type RepositoryRuleset_target int const ( diff --git a/pkg/github/models/sub_issues_summary.go b/pkg/github/models/sub_issues_summary.go new file mode 100644 index 00000000..6f875b61 --- /dev/null +++ b/pkg/github/models/sub_issues_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SubIssuesSummary 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 completed property + completed *int32 + // The percent_completed property + percent_completed *int32 + // The total property + total *int32 +} +// NewSubIssuesSummary instantiates a new SubIssuesSummary and sets the default values. +func NewSubIssuesSummary()(*SubIssuesSummary) { + m := &SubIssuesSummary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSubIssuesSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSubIssuesSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubIssuesSummary(), 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 *SubIssuesSummary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompleted gets the completed property value. The completed property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetCompleted()(*int32) { + return m.completed +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SubIssuesSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleted(val) + } + return nil + } + res["percent_completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentCompleted(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetPercentCompleted gets the percent_completed property value. The percent_completed property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetPercentCompleted()(*int32) { + return m.percent_completed +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *SubIssuesSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("completed", m.GetCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("percent_completed", m.GetPercentCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + 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 *SubIssuesSummary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompleted sets the completed property value. The completed property +func (m *SubIssuesSummary) SetCompleted(value *int32)() { + m.completed = value +} +// SetPercentCompleted sets the percent_completed property value. The percent_completed property +func (m *SubIssuesSummary) SetPercentCompleted(value *int32)() { + m.percent_completed = value +} +// SetTotal sets the total property value. The total property +func (m *SubIssuesSummary) SetTotal(value *int32)() { + m.total = value +} +type SubIssuesSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompleted()(*int32) + GetPercentCompleted()(*int32) + GetTotal()(*int32) + SetCompleted(value *int32)() + SetPercentCompleted(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/team_role_assignment.go b/pkg/github/models/team_role_assignment.go index e51c85fc..5a017b0f 100644 --- a/pkg/github/models/team_role_assignment.go +++ b/pkg/github/models/team_role_assignment.go @@ -8,6 +8,8 @@ import ( type TeamRoleAssignment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // Determines if the team has a direct, indirect, or mixed relationship to a role + assignment *TeamRoleAssignment_assignment // The description property description *string // The html_url property @@ -54,6 +56,11 @@ func CreateTeamRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *TeamRoleAssignment) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetAssignment gets the assignment property value. Determines if the team has a direct, indirect, or mixed relationship to a role +// returns a *TeamRoleAssignment_assignment when successful +func (m *TeamRoleAssignment) GetAssignment()(*TeamRoleAssignment_assignment) { + return m.assignment +} // GetDescription gets the description property value. The description property // returns a *string when successful func (m *TeamRoleAssignment) GetDescription()(*string) { @@ -63,6 +70,16 @@ func (m *TeamRoleAssignment) GetDescription()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *TeamRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamRoleAssignment_assignment) + if err != nil { + return err + } + if val != nil { + m.SetAssignment(val.(*TeamRoleAssignment_assignment)) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -272,6 +289,13 @@ func (m *TeamRoleAssignment) GetUrl()(*string) { } // Serialize serializes information the current object func (m *TeamRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignment() != nil { + cast := (*m.GetAssignment()).String() + err := writer.WriteStringValue("assignment", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -368,6 +392,10 @@ func (m *TeamRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *TeamRoleAssignment) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetAssignment sets the assignment property value. Determines if the team has a direct, indirect, or mixed relationship to a role +func (m *TeamRoleAssignment) SetAssignment(value *TeamRoleAssignment_assignment)() { + m.assignment = value +} // SetDescription sets the description property value. The description property func (m *TeamRoleAssignment) SetDescription(value *string)() { m.description = value @@ -427,6 +455,7 @@ func (m *TeamRoleAssignment) SetUrl(value *string)() { type TeamRoleAssignmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignment()(*TeamRoleAssignment_assignment) GetDescription()(*string) GetHtmlUrl()(*string) GetId()(*int32) @@ -441,6 +470,7 @@ type TeamRoleAssignmentable interface { GetRepositoriesUrl()(*string) GetSlug()(*string) GetUrl()(*string) + SetAssignment(value *TeamRoleAssignment_assignment)() SetDescription(value *string)() SetHtmlUrl(value *string)() SetId(value *int32)() diff --git a/pkg/github/models/team_role_assignment_escaped_assignment.go b/pkg/github/models/team_role_assignment_escaped_assignment.go new file mode 100644 index 00000000..3065790a --- /dev/null +++ b/pkg/github/models/team_role_assignment_escaped_assignment.go @@ -0,0 +1,37 @@ +package models +// Determines if the team has a direct, indirect, or mixed relationship to a role +type TeamRoleAssignment_assignment int + +const ( + DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT TeamRoleAssignment_assignment = iota + INDIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + MIXED_TEAMROLEASSIGNMENT_ASSIGNMENT +) + +func (i TeamRoleAssignment_assignment) String() string { + return []string{"direct", "indirect", "mixed"}[i] +} +func ParseTeamRoleAssignment_assignment(v string) (any, error) { + result := DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + switch v { + case "direct": + result = DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + case "indirect": + result = INDIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + case "mixed": + result = MIXED_TEAMROLEASSIGNMENT_ASSIGNMENT + default: + return nil, nil + } + return &result, nil +} +func SerializeTeamRoleAssignment_assignment(values []TeamRoleAssignment_assignment) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamRoleAssignment_assignment) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/user_role_assignment.go b/pkg/github/models/user_role_assignment.go index 5194b0e6..23e47e28 100644 --- a/pkg/github/models/user_role_assignment.go +++ b/pkg/github/models/user_role_assignment.go @@ -8,6 +8,8 @@ import ( type UserRoleAssignment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // Determines if the user has a direct, indirect, or mixed relationship to a role + assignment *UserRoleAssignment_assignment // The avatar_url property avatar_url *string // The email property @@ -26,6 +28,8 @@ type UserRoleAssignment struct { html_url *string // The id property id *int32 + // Team the user has gotten the role through + inherited_from []TeamSimpleable // The login property login *string // The name property @@ -70,6 +74,11 @@ func CreateUserRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *UserRoleAssignment) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetAssignment gets the assignment property value. Determines if the user has a direct, indirect, or mixed relationship to a role +// returns a *UserRoleAssignment_assignment when successful +func (m *UserRoleAssignment) GetAssignment()(*UserRoleAssignment_assignment) { + return m.assignment +} // GetAvatarUrl gets the avatar_url property value. The avatar_url property // returns a *string when successful func (m *UserRoleAssignment) GetAvatarUrl()(*string) { @@ -89,6 +98,16 @@ func (m *UserRoleAssignment) GetEventsUrl()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserRoleAssignment_assignment) + if err != nil { + return err + } + if val != nil { + m.SetAssignment(val.(*UserRoleAssignment_assignment)) + } + return nil + } res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -179,6 +198,22 @@ func (m *UserRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["inherited_from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamSimpleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TeamSimpleable) + } + } + m.SetInheritedFrom(res) + } + return nil + } res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -341,6 +376,11 @@ func (m *UserRoleAssignment) GetHtmlUrl()(*string) { func (m *UserRoleAssignment) GetId()(*int32) { return m.id } +// GetInheritedFrom gets the inherited_from property value. Team the user has gotten the role through +// returns a []TeamSimpleable when successful +func (m *UserRoleAssignment) GetInheritedFrom()([]TeamSimpleable) { + return m.inherited_from +} // GetLogin gets the login property value. The login property // returns a *string when successful func (m *UserRoleAssignment) GetLogin()(*string) { @@ -408,6 +448,13 @@ func (m *UserRoleAssignment) GetUserViewType()(*string) { } // Serialize serializes information the current object func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignment() != nil { + cast := (*m.GetAssignment()).String() + err := writer.WriteStringValue("assignment", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) if err != nil { @@ -462,6 +509,18 @@ func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetInheritedFrom() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInheritedFrom())) + for i, v := range m.GetInheritedFrom() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("inherited_from", cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("login", m.GetLogin()) if err != nil { @@ -552,6 +611,10 @@ func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *UserRoleAssignment) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetAssignment sets the assignment property value. Determines if the user has a direct, indirect, or mixed relationship to a role +func (m *UserRoleAssignment) SetAssignment(value *UserRoleAssignment_assignment)() { + m.assignment = value +} // SetAvatarUrl sets the avatar_url property value. The avatar_url property func (m *UserRoleAssignment) SetAvatarUrl(value *string)() { m.avatar_url = value @@ -588,6 +651,10 @@ func (m *UserRoleAssignment) SetHtmlUrl(value *string)() { func (m *UserRoleAssignment) SetId(value *int32)() { m.id = value } +// SetInheritedFrom sets the inherited_from property value. Team the user has gotten the role through +func (m *UserRoleAssignment) SetInheritedFrom(value []TeamSimpleable)() { + m.inherited_from = value +} // SetLogin sets the login property value. The login property func (m *UserRoleAssignment) SetLogin(value *string)() { m.login = value @@ -643,6 +710,7 @@ func (m *UserRoleAssignment) SetUserViewType(value *string)() { type UserRoleAssignmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignment()(*UserRoleAssignment_assignment) GetAvatarUrl()(*string) GetEmail()(*string) GetEventsUrl()(*string) @@ -652,6 +720,7 @@ type UserRoleAssignmentable interface { GetGravatarId()(*string) GetHtmlUrl()(*string) GetId()(*int32) + GetInheritedFrom()([]TeamSimpleable) GetLogin()(*string) GetName()(*string) GetNodeId()(*string) @@ -665,6 +734,7 @@ type UserRoleAssignmentable interface { GetTypeEscaped()(*string) GetUrl()(*string) GetUserViewType()(*string) + SetAssignment(value *UserRoleAssignment_assignment)() SetAvatarUrl(value *string)() SetEmail(value *string)() SetEventsUrl(value *string)() @@ -674,6 +744,7 @@ type UserRoleAssignmentable interface { SetGravatarId(value *string)() SetHtmlUrl(value *string)() SetId(value *int32)() + SetInheritedFrom(value []TeamSimpleable)() SetLogin(value *string)() SetName(value *string)() SetNodeId(value *string)() diff --git a/pkg/github/models/user_role_assignment_escaped_assignment.go b/pkg/github/models/user_role_assignment_escaped_assignment.go new file mode 100644 index 00000000..8a2e96e8 --- /dev/null +++ b/pkg/github/models/user_role_assignment_escaped_assignment.go @@ -0,0 +1,37 @@ +package models +// Determines if the user has a direct, indirect, or mixed relationship to a role +type UserRoleAssignment_assignment int + +const ( + DIRECT_USERROLEASSIGNMENT_ASSIGNMENT UserRoleAssignment_assignment = iota + INDIRECT_USERROLEASSIGNMENT_ASSIGNMENT + MIXED_USERROLEASSIGNMENT_ASSIGNMENT +) + +func (i UserRoleAssignment_assignment) String() string { + return []string{"direct", "indirect", "mixed"}[i] +} +func ParseUserRoleAssignment_assignment(v string) (any, error) { + result := DIRECT_USERROLEASSIGNMENT_ASSIGNMENT + switch v { + case "direct": + result = DIRECT_USERROLEASSIGNMENT_ASSIGNMENT + case "indirect": + result = INDIRECT_USERROLEASSIGNMENT_ASSIGNMENT + case "mixed": + result = MIXED_USERROLEASSIGNMENT_ASSIGNMENT + default: + return nil, nil + } + return &result, nil +} +func SerializeUserRoleAssignment_assignment(values []UserRoleAssignment_assignment) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i UserRoleAssignment_assignment) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/users.go b/pkg/github/models/users.go index dd87f2ab..cf42c03e 100644 --- a/pkg/github/models/users.go +++ b/pkg/github/models/users.go @@ -7,16 +7,12 @@ import ( type Users 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 fragment property - fragment *string - // The matches property - matches []Users_matchesable - // The object_type property - object_type *string - // The object_url property - object_url *string - // The property property - property *string + // Whether this email address is the primary address. + primary *bool + // The type of email address. + typeEscaped *string + // The email address. + value *string } // NewUsers instantiates a new Users and sets the default values. func NewUsers()(*Users) { @@ -39,123 +35,69 @@ func (m *Users) GetAdditionalData()(map[string]any) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetFragment(val) - } - return nil - } - res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateUsers_matchesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]Users_matchesable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(Users_matchesable) - } - } - m.SetMatches(res) - } - return nil - } - res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() + res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() if err != nil { return err } if val != nil { - m.SetObjectType(val) + m.SetPrimary(val) } return nil } - res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { - m.SetObjectUrl(val) + m.SetTypeEscaped(val) } return nil } - res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { - m.SetProperty(val) + m.SetValue(val) } return nil } return res } -// GetFragment gets the fragment property value. The fragment property -// returns a *string when successful -func (m *Users) GetFragment()(*string) { - return m.fragment -} -// GetMatches gets the matches property value. The matches property -// returns a []Users_matchesable when successful -func (m *Users) GetMatches()([]Users_matchesable) { - return m.matches -} -// GetObjectType gets the object_type property value. The object_type property -// returns a *string when successful -func (m *Users) GetObjectType()(*string) { - return m.object_type +// GetPrimary gets the primary property value. Whether this email address is the primary address. +// returns a *bool when successful +func (m *Users) GetPrimary()(*bool) { + return m.primary } -// GetObjectUrl gets the object_url property value. The object_url property +// GetTypeEscaped gets the type property value. The type of email address. // returns a *string when successful -func (m *Users) GetObjectUrl()(*string) { - return m.object_url +func (m *Users) GetTypeEscaped()(*string) { + return m.typeEscaped } -// GetProperty gets the property property value. The property property +// GetValue gets the value property value. The email address. // returns a *string when successful -func (m *Users) GetProperty()(*string) { - return m.property +func (m *Users) GetValue()(*string) { + return m.value } // Serialize serializes information the current object func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { - err := writer.WriteStringValue("fragment", m.GetFragment()) - if err != nil { - return err - } - } - if m.GetMatches() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) - for i, v := range m.GetMatches() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("matches", cast) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("object_type", m.GetObjectType()) + err := writer.WriteBoolValue("primary", m.GetPrimary()) if err != nil { return err } } { - err := writer.WriteStringValue("object_url", m.GetObjectUrl()) + err := writer.WriteStringValue("type", m.GetTypeEscaped()) if err != nil { return err } } { - err := writer.WriteStringValue("property", m.GetProperty()) + err := writer.WriteStringValue("value", m.GetValue()) if err != nil { return err } @@ -172,37 +114,25 @@ func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 func (m *Users) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetFragment sets the fragment property value. The fragment property -func (m *Users) SetFragment(value *string)() { - m.fragment = value -} -// SetMatches sets the matches property value. The matches property -func (m *Users) SetMatches(value []Users_matchesable)() { - m.matches = value -} -// SetObjectType sets the object_type property value. The object_type property -func (m *Users) SetObjectType(value *string)() { - m.object_type = value +// SetPrimary sets the primary property value. Whether this email address is the primary address. +func (m *Users) SetPrimary(value *bool)() { + m.primary = value } -// SetObjectUrl sets the object_url property value. The object_url property -func (m *Users) SetObjectUrl(value *string)() { - m.object_url = value +// SetTypeEscaped sets the type property value. The type of email address. +func (m *Users) SetTypeEscaped(value *string)() { + m.typeEscaped = value } -// SetProperty sets the property property value. The property property -func (m *Users) SetProperty(value *string)() { - m.property = value +// SetValue sets the value property value. The email address. +func (m *Users) SetValue(value *string)() { + m.value = value } type Usersable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetFragment()(*string) - GetMatches()([]Users_matchesable) - GetObjectType()(*string) - GetObjectUrl()(*string) - GetProperty()(*string) - SetFragment(value *string)() - SetMatches(value []Users_matchesable)() - SetObjectType(value *string)() - SetObjectUrl(value *string)() - SetProperty(value *string)() + GetPrimary()(*bool) + GetTypeEscaped()(*string) + GetValue()(*string) + SetPrimary(value *bool)() + SetTypeEscaped(value *string)() + SetValue(value *string)() } diff --git a/pkg/github/models/users_escaped_matches.go b/pkg/github/models/users_escaped_matches.go deleted file mode 100644 index 01a8d51e..00000000 --- a/pkg/github/models/users_escaped_matches.go +++ /dev/null @@ -1,115 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type Users_matches 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 indices property - indices []int32 - // The text property - text *string -} -// NewUsers_matches instantiates a new Users_matches and sets the default values. -func NewUsers_matches()(*Users_matches) { - m := &Users_matches{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateUsers_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateUsers_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewUsers_matches(), 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 *Users_matches) 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 *Users_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("int32") - if err != nil { - return err - } - if val != nil { - res := make([]int32, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*int32)) - } - } - m.SetIndices(res) - } - return nil - } - res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetText(val) - } - return nil - } - return res -} -// GetIndices gets the indices property value. The indices property -// returns a []int32 when successful -func (m *Users_matches) GetIndices()([]int32) { - return m.indices -} -// GetText gets the text property value. The text property -// returns a *string when successful -func (m *Users_matches) GetText()(*string) { - return m.text -} -// Serialize serializes information the current object -func (m *Users_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetIndices() != nil { - err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("text", m.GetText()) - 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 *Users_matches) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetIndices sets the indices property value. The indices property -func (m *Users_matches) SetIndices(value []int32)() { - m.indices = value -} -// SetText sets the text property value. The text property -func (m *Users_matches) SetText(value *string)() { - m.text = value -} -type Users_matchesable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetIndices()([]int32) - GetText()(*string) - SetIndices(value []int32)() - SetText(value *string)() -} diff --git a/pkg/github/orgs/item/properties/schema/item/with_custom_escaped_property_escaped_name_put_request_body_escaped_value_escaped_type.go b/pkg/github/orgs/item/properties/schema/item/with_custom_escaped_property_escaped_name_put_request_body_escaped_value_escaped_type.go deleted file mode 100644 index c0d471ea..00000000 --- a/pkg/github/orgs/item/properties/schema/item/with_custom_escaped_property_escaped_name_put_request_body_escaped_value_escaped_type.go +++ /dev/null @@ -1,40 +0,0 @@ -package item -// The type of the value for the property -type WithCustom_property_namePutRequestBody_value_type int - -const ( - STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE WithCustom_property_namePutRequestBody_value_type = iota - SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE -) - -func (i WithCustom_property_namePutRequestBody_value_type) String() string { - return []string{"string", "single_select", "multi_select", "true_false"}[i] -} -func ParseWithCustom_property_namePutRequestBody_value_type(v string) (any, error) { - result := STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - switch v { - case "string": - result = STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - case "single_select": - result = SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - case "multi_select": - result = MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - case "true_false": - result = TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE - default: - return nil, nil - } - return &result, nil -} -func SerializeWithCustom_property_namePutRequestBody_value_type(values []WithCustom_property_namePutRequestBody_value_type) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result -} -func (i WithCustom_property_namePutRequestBody_value_type) isMultiValue() bool { - return false -} diff --git a/pkg/github/orgs/item/rulesets/item/with_ruleset_escaped_put_request_body_escaped_target.go b/pkg/github/orgs/item/rulesets/item/with_ruleset_escaped_put_request_body_escaped_target.go index 5ec257fb..b53eb998 100644 --- a/pkg/github/orgs/item/rulesets/item/with_ruleset_escaped_put_request_body_escaped_target.go +++ b/pkg/github/orgs/item/rulesets/item/with_ruleset_escaped_put_request_body_escaped_target.go @@ -1,5 +1,5 @@ package item -// The target of the ruleset +// The target of the ruleset. type WithRuleset_PutRequestBody_target int const ( diff --git a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_source_escaped_type.go b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_source_escaped_type.go new file mode 100644 index 00000000..6b689799 --- /dev/null +++ b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_source_escaped_type.go @@ -0,0 +1,34 @@ +package rulesets +// The type of the source of the ruleset +type RulesetsPostRequestBody_source_type int + +const ( + REPOSITORY_RULESETSPOSTREQUESTBODY_SOURCE_TYPE RulesetsPostRequestBody_source_type = iota + ORGANIZATION_RULESETSPOSTREQUESTBODY_SOURCE_TYPE +) + +func (i RulesetsPostRequestBody_source_type) String() string { + return []string{"Repository", "Organization"}[i] +} +func ParseRulesetsPostRequestBody_source_type(v string) (any, error) { + result := REPOSITORY_RULESETSPOSTREQUESTBODY_SOURCE_TYPE + switch v { + case "Repository": + result = REPOSITORY_RULESETSPOSTREQUESTBODY_SOURCE_TYPE + case "Organization": + result = ORGANIZATION_RULESETSPOSTREQUESTBODY_SOURCE_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeRulesetsPostRequestBody_source_type(values []RulesetsPostRequestBody_source_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RulesetsPostRequestBody_source_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_target.go b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_target.go index bba7d001..e67c7391 100644 --- a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_target.go +++ b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_escaped_target.go @@ -1,5 +1,5 @@ package rulesets -// The target of the ruleset +// The target of the ruleset. type RulesetsPostRequestBody_target int const ( diff --git a/pkg/github/orgs/item_hooks_request_builder.go b/pkg/github/orgs/item_hooks_request_builder.go index 03719750..4a73756a 100644 --- a/pkg/github/orgs/item_hooks_request_builder.go +++ b/pkg/github/orgs/item_hooks_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemHooksRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemHooksRequestBuilderGetQueryParameters you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ItemHooksRequestBuilderGetQueryParameters list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. type ItemHooksRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -41,7 +41,7 @@ func NewItemHooksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 urlParams["request-raw-url"] = rawUrl return NewItemHooksRequestBuilderInternal(urlParams, requestAdapter) } -// Get you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// Get list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a []OrgHookable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -92,7 +92,7 @@ func (m *ItemHooksRequestBuilder) Post(ctx context.Context, body ItemHooksPostRe } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgHookable), nil } -// ToGetRequestInformation you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ToGetRequestInformation list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a *RequestInformation when successful func (m *ItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go b/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go index 48ec56a2..a0273208 100644 --- a/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go @@ -28,7 +28,7 @@ func NewItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// Delete delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a BasicError error when the service returns a 404 status code // [API method documentation] // @@ -105,7 +105,7 @@ func (m *ItemHooksWithHook_ItemRequestBuilder) Patch(ctx context.Context, body I func (m *ItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemHooksItemPingsRequestBuilder) { return NewItemHooksItemPingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ToDeleteRequestInformation delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a *RequestInformation when successful func (m *ItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go b/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go deleted file mode 100644 index da176ffa..00000000 --- a/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go +++ /dev/null @@ -1,273 +0,0 @@ -package orgs - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]any - // An ordered list of the allowed values of the property.The property can have up to 200 allowed values. - allowed_values []string - // Default value of the property - default_value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable - // Short description of the property - description *string - // Whether the property is required. - required *bool -} -// ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value composed type wrapper for classes string, []string -type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value struct { - // Composed type representation for type []string - string []string - // Composed type representation for type string - withCustom_property_namePutRequestBody_default_valueString *string -} -// NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value and sets the default values. -func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) { - m := &ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value{ - } - return m -} -// CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value() - if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("") - if err != nil { - return nil, err - } - if mappingValueNode != nil { - mappingValue, err := mappingValueNode.GetStringValue() - if err != nil { - return nil, err - } - if mappingValue != nil { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetWithCustomPropertyNamePutRequestBodyDefaultValueString(val) - } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { - if err != nil { - return nil, err - } - cast := make([]string, len(val)) - for i, v := range val { - if v != nil { - cast[i] = *(v.(*string)) - } - } - result.SetString(cast) - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) -} -// GetIsComposedType determines if the current object is a wrapper around a composed type -// returns a bool when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetIsComposedType()(bool) { - return true -} -// GetString gets the string property value. Composed type representation for type []string -// returns a []string when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetString()([]string) { - return m.string -} -// GetWithCustomPropertyNamePutRequestBodyDefaultValueString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetWithCustomPropertyNamePutRequestBodyDefaultValueString()(*string) { - return m.withCustom_property_namePutRequestBody_default_valueString -} -// Serialize serializes information the current object -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetWithCustomPropertyNamePutRequestBodyDefaultValueString() != nil { - err := writer.WriteStringValue("", m.GetWithCustomPropertyNamePutRequestBodyDefaultValueString()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteCollectionOfStringValues("", m.GetString()) - if err != nil { - return err - } - } - return nil -} -// SetString sets the string property value. Composed type representation for type []string -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetString(value []string)() { - m.string = value -} -// SetWithCustomPropertyNamePutRequestBodyDefaultValueString sets the string property value. Composed type representation for type string -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetWithCustomPropertyNamePutRequestBodyDefaultValueString(value *string)() { - m.withCustom_property_namePutRequestBody_default_valueString = value -} -type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetString()([]string) - GetWithCustomPropertyNamePutRequestBodyDefaultValueString()(*string) - SetString(value []string)() - SetWithCustomPropertyNamePutRequestBodyDefaultValueString(value *string)() -} -// NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody and sets the default values. -func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) { - m := &ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody(), 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 *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetAllowedValues gets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. -// returns a []string when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetAllowedValues()([]string) { - return m.allowed_values -} -// GetDefaultValue gets the default_value property value. Default value of the property -// returns a ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetDefaultValue()(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable) { - return m.default_value -} -// GetDescription gets the description property value. Short description of the property -// returns a *string when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetDescription()(*string) { - return m.description -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["allowed_values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - 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.SetAllowedValues(res) - } - return nil - } - res["default_value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetDefaultValue(val.(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)) - } - 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["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetRequired(val) - } - return nil - } - return res -} -// GetRequired gets the required property value. Whether the property is required. -// returns a *bool when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) GetRequired()(*bool) { - return m.required -} -// Serialize serializes information the current object -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAllowedValues() != nil { - err := writer.WriteCollectionOfStringValues("allowed_values", m.GetAllowedValues()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("default_value", m.GetDefaultValue()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("description", m.GetDescription()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("required", m.GetRequired()) - 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 *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetAllowedValues sets the allowed_values property value. An ordered list of the allowed values of the property.The property can have up to 200 allowed values. -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetAllowedValues(value []string)() { - m.allowed_values = value -} -// SetDefaultValue sets the default_value property value. Default value of the property -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetDefaultValue(value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)() { - m.default_value = value -} -// SetDescription sets the description property value. Short description of the property -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetDescription(value *string)() { - m.description = value -} -// SetRequired sets the required property value. Whether the property is required. -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) SetRequired(value *bool)() { - m.required = value -} -type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAllowedValues()([]string) - GetDefaultValue()(ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable) - GetDescription()(*string) - GetRequired()(*bool) - SetAllowedValues(value []string)() - SetDefaultValue(value ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable)() - SetDescription(value *string)() - SetRequired(value *bool)() -} diff --git a/pkg/github/orgs/item_properties_schema_with_custom_escaped_property_escaped_name_item_request_builder.go b/pkg/github/orgs/item_properties_schema_with_custom_escaped_property_escaped_name_item_request_builder.go index b91e8dbc..9f1071e5 100644 --- a/pkg/github/orgs/item_properties_schema_with_custom_escaped_property_escaped_name_item_request_builder.go +++ b/pkg/github/orgs/item_properties_schema_with_custom_escaped_property_escaped_name_item_request_builder.go @@ -76,7 +76,7 @@ func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Get(ctx // [API method documentation] // // [API method documentation]: https://docs.github.com/enterprise-server@3.14/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization -func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CustomPropertyable, error) { +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) Put(ctx context.Context, body ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CustomPropertySetPayloadable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CustomPropertyable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -112,7 +112,7 @@ func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToGetRe } // ToPutRequestInformation creates a new or updates an existing custom property that is defined for an organization.To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. // returns a *RequestInformation when successful -func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemPropertiesSchemaItemWithCustom_property_namePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemPropertiesSchemaWithCustom_property_nameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CustomPropertySetPayloadable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") diff --git a/pkg/github/orgs/item_rulesets_item_with_ruleset_escaped_put_request_body.go b/pkg/github/orgs/item_rulesets_item_with_ruleset_escaped_put_request_body.go index 24cad8bf..a693e952 100644 --- a/pkg/github/orgs/item_rulesets_item_with_ruleset_escaped_put_request_body.go +++ b/pkg/github/orgs/item_rulesets_item_with_ruleset_escaped_put_request_body.go @@ -12,7 +12,7 @@ type ItemRulesetsItemWithRuleset_PutRequestBody struct { bypass_actors []ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetBypassActorable // Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property. conditions ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable - // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. enforcement *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement // The name of the ruleset. name *string @@ -46,7 +46,7 @@ func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetBypassActors()([]ie1e207 func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetConditions()(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable) { return m.conditions } -// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. // returns a *RepositoryRuleEnforcement when successful func (m *ItemRulesetsItemWithRuleset_PutRequestBody) GetEnforcement()(*ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement) { return m.enforcement @@ -194,7 +194,7 @@ func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetBypassActors(value []ie1 func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetConditions(value ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable)() { m.conditions = value } -// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. func (m *ItemRulesetsItemWithRuleset_PutRequestBody) SetEnforcement(value *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement)() { m.enforcement = value } diff --git a/pkg/github/orgs/item_rulesets_post_request_body.go b/pkg/github/orgs/item_rulesets_post_request_body.go index b091d9f8..0a9eb95e 100644 --- a/pkg/github/orgs/item_rulesets_post_request_body.go +++ b/pkg/github/orgs/item_rulesets_post_request_body.go @@ -12,7 +12,7 @@ type ItemRulesetsPostRequestBody struct { bypass_actors []ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetBypassActorable // Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property. conditions ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable - // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. enforcement *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement // The name of the ruleset. name *string @@ -46,7 +46,7 @@ func (m *ItemRulesetsPostRequestBody) GetBypassActors()([]ie1e2072a5a4eb80f74a13 func (m *ItemRulesetsPostRequestBody) GetConditions()(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable) { return m.conditions } -// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. // returns a *RepositoryRuleEnforcement when successful func (m *ItemRulesetsPostRequestBody) GetEnforcement()(*ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement) { return m.enforcement @@ -194,7 +194,7 @@ func (m *ItemRulesetsPostRequestBody) SetBypassActors(value []ie1e2072a5a4eb80f7 func (m *ItemRulesetsPostRequestBody) SetConditions(value ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.OrgRulesetConditionsable)() { m.conditions = value } -// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. func (m *ItemRulesetsPostRequestBody) SetEnforcement(value *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement)() { m.enforcement = value } diff --git a/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go index 564d3372..3757aebb 100644 --- a/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go +++ b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go @@ -22,8 +22,8 @@ type ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. Ref *string `uriparametername:"ref"` - // The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. - Repository_name *int32 `uriparametername:"repository_name"` + // The name of the repository to filter on. + Repository_name *string `uriparametername:"repository_name"` // The rule results to filter on. When specified, only suites with this result will be returned. Rule_suite_result *i31c30ddb6562bcb87dda14919ea43ceb1ab0722affb3dc558b9a6559aaa54f67.GetRule_suite_resultQueryParameterType `uriparametername:"rule_suite_result"` // The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). diff --git a/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go b/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go index 7dd0e363..bdb0bb14 100644 --- a/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go +++ b/pkg/github/orgs/item_secret_scanning_alerts_request_builder.go @@ -25,7 +25,7 @@ type ItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. Resolution *string `uriparametername:"resolution"` - // A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + // A comma-separated list of secret types to return. By default all secret types are returned. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. Secret_type *string `uriparametername:"secret_type"` // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. Sort *i7424a7e7ed210907f3a1fcdf8aa90dffa3a9669350059ae8849bd2aba37a1b90.GetSortQueryParameterType `uriparametername:"sort"` diff --git a/pkg/github/repos/item_item_actions_runs_request_builder.go b/pkg/github/repos/item_item_actions_runs_request_builder.go index 9158f0e8..5f9e939a 100644 --- a/pkg/github/repos/item_item_actions_runs_request_builder.go +++ b/pkg/github/repos/item_item_actions_runs_request_builder.go @@ -12,7 +12,7 @@ import ( type ItemItemActionsRunsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemActionsRunsRequestBuilderGetQueryParameters lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// ItemItemActionsRunsRequestBuilderGetQueryParameters lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. type ItemItemActionsRunsRequestBuilderGetQueryParameters struct { // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. Actor *string `uriparametername:"actor"` @@ -58,7 +58,7 @@ func NewItemItemActionsRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187 urlParams["request-raw-url"] = rawUrl return NewItemItemActionsRunsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// Get lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a ItemItemActionsRunsGetResponseable when successful // [API method documentation] // @@ -77,7 +77,7 @@ func (m *ItemItemActionsRunsRequestBuilder) Get(ctx context.Context, requestConf } return res.(ItemItemActionsRunsGetResponseable), nil } -// ToGetRequestInformation lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// ToGetRequestInformation lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a *RequestInformation when successful func (m *ItemItemActionsRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go index c135c253..2022f2c5 100644 --- a/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go +++ b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemActionsWorkflowsItemRunsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. type ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters struct { // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. Actor *string `uriparametername:"actor"` @@ -47,7 +47,7 @@ func NewItemItemActionsWorkflowsItemRunsRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal(urlParams, requestAdapter) } -// Get list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// Get list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a ItemItemActionsWorkflowsItemRunsGetResponseable when successful // [API method documentation] // @@ -66,7 +66,7 @@ func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) Get(ctx context.Context } return res.(ItemItemActionsWorkflowsItemRunsGetResponseable), nil } -// ToGetRequestInformation list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ToGetRequestInformation list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.14/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a *RequestInformation when successful func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go index 58da8b95..ee36b376 100644 --- a/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemCommitsCommit_shaItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -50,7 +50,7 @@ func NewItemItemCommitsCommit_shaItemRequestBuilder(rawUrl string, requestAdapte urlParams["request-raw-url"] = rawUrl return NewItemItemCommitsCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a Commitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -96,7 +96,7 @@ func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Status()(*ItemItemCommitsI func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Statuses()(*ItemItemCommitsItemStatusesRequestBuilder) { return NewItemItemCommitsItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCommitsCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_request_builder.go b/pkg/github/repos/item_item_commits_request_builder.go index a8cf322d..501a3d50 100644 --- a/pkg/github/repos/item_item_commits_request_builder.go +++ b/pkg/github/repos/item_item_commits_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemCommitsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCommitsRequestBuilderGetQueryParameters **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCommitsRequestBuilderGetQueryParameters **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCommitsRequestBuilderGetQueryParameters struct { // GitHub username or email address to use to filter by commit author. Author *string `uriparametername:"author"` @@ -55,7 +55,7 @@ func NewItemItemCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemItemCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a []Commitable when successful // returns a BasicError error when the service returns a 400 status code // returns a BasicError error when the service returns a 404 status code @@ -87,7 +87,7 @@ func (m *ItemItemCommitsRequestBuilder) Get(ctx context.Context, requestConfigur } return val, nil } -// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go index 48bbf4aa..7d3a6c20 100644 --- a/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go +++ b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemCompareWithBaseheadItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemItemCompareWithBaseheadItemRequestBuilder(rawUrl string, requestAdap urlParams["request-raw-url"] = rawUrl return NewItemItemCompareWithBaseheadItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a CommitComparisonable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 500 status code @@ -57,7 +57,7 @@ func (m *ItemItemCompareWithBaseheadItemRequestBuilder) Get(ctx context.Context, } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CommitComparisonable), nil } -// ToGetRequestInformation compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-server@3.14/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.14/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCompareWithBaseheadItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_commits_request_builder.go b/pkg/github/repos/item_item_git_commits_request_builder.go index 88826e37..f9735331 100644 --- a/pkg/github/repos/item_item_git_commits_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_request_builder.go @@ -35,7 +35,7 @@ func NewItemItemGitCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewItemItemGitCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -62,7 +62,7 @@ func (m *ItemItemGitCommitsRequestBuilder) Post(ctx context.Context, body ItemIt } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GitCommitable), nil } -// ToPostRequestInformation creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToPostRequestInformation creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitCommitsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitCommitsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go index 636f222c..8afe35d2 100644 --- a/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemGitCommitsWithCommit_shaItemRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -48,7 +48,7 @@ func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) Get(ctx context.Con } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GitCommitable), nil } -// ToGetRequestInformation gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_tags_request_builder.go b/pkg/github/repos/item_item_git_tags_request_builder.go index 291b9293..ca505df4 100644 --- a/pkg/github/repos/item_item_git_tags_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_request_builder.go @@ -35,7 +35,7 @@ func NewItemItemGitTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemItemGitTagsRequestBuilderInternal(urlParams, requestAdapter) } -// Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful // returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code @@ -60,7 +60,7 @@ func (m *ItemItemGitTagsRequestBuilder) Post(ctx context.Context, body ItemItemG } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GitTagable), nil } -// ToPostRequestInformation note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToPostRequestInformation note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@3.14/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitTagsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitTagsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go index fa58c17f..f5d86f1c 100644 --- a/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemGitTagsWithTag_shaItemRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -48,7 +48,7 @@ func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) Get(ctx context.Context, } return res.(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.GitTagable), nil } -// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go b/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go index 1f053ed4..fda0897b 100644 --- a/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go +++ b/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go @@ -28,7 +28,7 @@ func NewItemItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i urlParams["request-raw-url"] = rawUrl return NewItemItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete a repository webhook +// Delete delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. // returns a BasicError error when the service returns a 404 status code // [API method documentation] // @@ -110,6 +110,7 @@ func (m *ItemItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemItemHooksItemPin func (m *ItemItemHooksWithHook_ItemRequestBuilder) Tests()(*ItemItemHooksItemTestsRequestBuilder) { return NewItemItemHooksItemTestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ToDeleteRequestInformation delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. // returns a *RequestInformation when successful func (m *ItemItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go b/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go index 3af793b4..fd280034 100644 --- a/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go +++ b/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go @@ -38,7 +38,7 @@ func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) Delete(ctx context. } return nil } -// Get to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// Get to download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. // returns a ReleaseAssetable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -86,7 +86,7 @@ func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToDeleteRequestInfo i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// ToGetRequestInformation to download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.14/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. // returns a *RequestInformation when successful func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_rulesets_item_with_ruleset_escaped_put_request_body.go b/pkg/github/repos/item_item_rulesets_item_with_ruleset_escaped_put_request_body.go index 6cb7832c..163f1fdc 100644 --- a/pkg/github/repos/item_item_rulesets_item_with_ruleset_escaped_put_request_body.go +++ b/pkg/github/repos/item_item_rulesets_item_with_ruleset_escaped_put_request_body.go @@ -12,7 +12,7 @@ type ItemItemRulesetsItemWithRuleset_PutRequestBody struct { bypass_actors []ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetBypassActorable // Parameters for a repository ruleset ref name condition conditions ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable - // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. enforcement *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement // The name of the ruleset. name *string @@ -46,7 +46,7 @@ func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetBypassActors()([]ie1 func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetConditions()(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable) { return m.conditions } -// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. // returns a *RepositoryRuleEnforcement when successful func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) GetEnforcement()(*ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement) { return m.enforcement @@ -194,7 +194,7 @@ func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetBypassActors(value [ func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetConditions(value ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable)() { m.conditions = value } -// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. func (m *ItemItemRulesetsItemWithRuleset_PutRequestBody) SetEnforcement(value *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement)() { m.enforcement = value } diff --git a/pkg/github/repos/item_item_rulesets_post_request_body.go b/pkg/github/repos/item_item_rulesets_post_request_body.go index 0a0dcd26..27ad763d 100644 --- a/pkg/github/repos/item_item_rulesets_post_request_body.go +++ b/pkg/github/repos/item_item_rulesets_post_request_body.go @@ -12,7 +12,7 @@ type ItemItemRulesetsPostRequestBody struct { bypass_actors []ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetBypassActorable // Parameters for a repository ruleset ref name condition conditions ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable - // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + // The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. enforcement *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement // The name of the ruleset. name *string @@ -46,7 +46,7 @@ func (m *ItemItemRulesetsPostRequestBody) GetBypassActors()([]ie1e2072a5a4eb80f7 func (m *ItemItemRulesetsPostRequestBody) GetConditions()(ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable) { return m.conditions } -// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// GetEnforcement gets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. // returns a *RepositoryRuleEnforcement when successful func (m *ItemItemRulesetsPostRequestBody) GetEnforcement()(*ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement) { return m.enforcement @@ -194,7 +194,7 @@ func (m *ItemItemRulesetsPostRequestBody) SetBypassActors(value []ie1e2072a5a4eb func (m *ItemItemRulesetsPostRequestBody) SetConditions(value ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRulesetConditionsable)() { m.conditions = value } -// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. +// SetEnforcement sets the enforcement property value. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. func (m *ItemItemRulesetsPostRequestBody) SetEnforcement(value *ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.RepositoryRuleEnforcement)() { m.enforcement = value } diff --git a/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go b/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go index d7897b46..b0e1cd48 100644 --- a/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go +++ b/pkg/github/repos/item_item_secret_scanning_alerts_request_builder.go @@ -26,7 +26,7 @@ type ItemItemSecretScanningAlertsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. Resolution *string `uriparametername:"resolution"` - // A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + // A comma-separated list of secret types to return. By default all secret types are returned. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.14/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. Secret_type *string `uriparametername:"secret_type"` // The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. Sort *ic653fdac08035cb8bfc7dabb4472628f1539065e4c88c3d7cb1a363ab7fa780f.GetSortQueryParameterType `uriparametername:"sort"`