diff --git a/go.mod b/go.mod index 87784957..0aad835a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21.5 require ( github.com/microsoft/kiota-abstractions-go v1.6.0 - github.com/microsoft/kiota-http-go v1.3.3 + github.com/microsoft/kiota-http-go v1.4.1 github.com/microsoft/kiota-serialization-form-go v1.0.0 github.com/microsoft/kiota-serialization-json-go v1.0.7 github.com/microsoft/kiota-serialization-multipart-go v1.0.0 diff --git a/go.sum b/go.sum index 296304ad..9826277c 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/microsoft/kiota-abstractions-go v1.6.0 h1:qbGBNMU0/o5myKbikCBXJFohVCFrrpx2cO15Rta2WyA= github.com/microsoft/kiota-abstractions-go v1.6.0/go.mod h1:7YH20ZbRWXGfHSSvdHkdztzgCB9mRdtFx13+hrYIEpo= -github.com/microsoft/kiota-http-go v1.3.3 h1:FKjK5BLFONu5eIBxtrkirkixFQmcPwitZ8iwZHKbESo= -github.com/microsoft/kiota-http-go v1.3.3/go.mod h1:IWw/PwtBs/GYz+Pa75gPW7MFNFv0aKPFsLw5WqzL1SE= +github.com/microsoft/kiota-http-go v1.4.1 h1:zR54JahUOcu8h9C5z00fcQChzX8d01+BwhkTS8H16Ro= +github.com/microsoft/kiota-http-go v1.4.1/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM= github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= github.com/microsoft/kiota-serialization-json-go v1.0.7 h1:yMbckSTPrjZdM4EMXgzLZSA3CtDaUBI350u0VoYRz7Y= diff --git a/pkg/github/advisories/get_direction_query_parameter_type.go b/pkg/github/advisories/get_direction_query_parameter_type.go index 2f7b45ba..45e84b47 100644 --- a/pkg/github/advisories/get_direction_query_parameter_type.go +++ b/pkg/github/advisories/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package advisories -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/advisories/get_severity_query_parameter_type.go b/pkg/github/advisories/get_severity_query_parameter_type.go index 42a51520..d8ca6f66 100644 --- a/pkg/github/advisories/get_severity_query_parameter_type.go +++ b/pkg/github/advisories/get_severity_query_parameter_type.go @@ -1,7 +1,4 @@ package advisories -import ( - "errors" -) type GetSeverityQueryParameterType int const ( @@ -29,7 +26,7 @@ func ParseGetSeverityQueryParameterType(v string) (any, error) { case "critical": result = CRITICAL_GETSEVERITYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSeverityQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/advisories/get_sort_query_parameter_type.go b/pkg/github/advisories/get_sort_query_parameter_type.go index d1b66020..c4365c5d 100644 --- a/pkg/github/advisories/get_sort_query_parameter_type.go +++ b/pkg/github/advisories/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package advisories -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "published": result = PUBLISHED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/advisories/get_type_query_parameter_type.go b/pkg/github/advisories/get_type_query_parameter_type.go index 528f5a5d..b189c0be 100644 --- a/pkg/github/advisories/get_type_query_parameter_type.go +++ b/pkg/github/advisories/get_type_query_parameter_type.go @@ -1,7 +1,4 @@ package advisories -import ( - "errors" -) type GetTypeQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetTypeQueryParameterType(v string) (any, error) { case "unreviewed": result = UNREVIEWED_GETTYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/applications/item_grant_request_builder.go b/pkg/github/applications/item_grant_request_builder.go index b971dd3c..418d9007 100644 --- a/pkg/github/applications/item_grant_request_builder.go +++ b/pkg/github/applications/item_grant_request_builder.go @@ -23,7 +23,7 @@ func NewItemGrantRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 urlParams["request-raw-url"] = rawUrl return NewItemGrantRequestBuilderInternal(urlParams, requestAdapter) } -// Delete oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). +// Delete oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -42,7 +42,7 @@ func (m *ItemGrantRequestBuilder) Delete(ctx context.Context, body ItemGrantDele } return nil } -// ToDeleteRequestInformation oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). +// ToDeleteRequestInformation oAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). // returns a *RequestInformation when successful func (m *ItemGrantRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemGrantDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/applications/item_token_request_builder.go b/pkg/github/applications/item_token_request_builder.go index 891f0389..24d49ad0 100644 --- a/pkg/github/applications/item_token_request_builder.go +++ b/pkg/github/applications/item_token_request_builder.go @@ -23,7 +23,7 @@ func NewItemTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 urlParams["request-raw-url"] = rawUrl return NewItemTokenRequestBuilderInternal(urlParams, requestAdapter) } -// Delete oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. +// Delete oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -42,7 +42,7 @@ func (m *ItemTokenRequestBuilder) Delete(ctx context.Context, body ItemTokenDele } return nil } -// Patch oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. +// Patch oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. // returns a Authorizationable when successful // returns a ValidationError error when the service returns a 422 status code // [API method documentation] @@ -65,7 +65,7 @@ func (m *ItemTokenRequestBuilder) Patch(ctx context.Context, body ItemTokenPatch } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Authorizationable), nil } -// Post oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. +// Post oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. // returns a Authorizationable when successful // returns a BasicError error when the service returns a 404 status code // returns a ValidationError error when the service returns a 422 status code @@ -95,7 +95,7 @@ func (m *ItemTokenRequestBuilder) Post(ctx context.Context, body ItemTokenPostRe func (m *ItemTokenRequestBuilder) Scoped()(*ItemTokenScopedRequestBuilder) { return NewItemTokenScopedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. +// ToDeleteRequestInformation oAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. // returns a *RequestInformation when successful func (m *ItemTokenRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemTokenDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -107,7 +107,7 @@ func (m *ItemTokenRequestBuilder) ToDeleteRequestInformation(ctx context.Context } return requestInfo, nil } -// ToPatchRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. +// ToPatchRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. // returns a *RequestInformation when successful func (m *ItemTokenRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemTokenPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -119,7 +119,7 @@ func (m *ItemTokenRequestBuilder) ToPatchRequestInformation(ctx context.Context, } return requestInfo, nil } -// ToPostRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. +// ToPostRequestInformation oAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. // returns a *RequestInformation when successful func (m *ItemTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTokenPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/applications/item_token_scoped_request_builder.go b/pkg/github/applications/item_token_scoped_request_builder.go index c14b4ae5..dc92913e 100644 --- a/pkg/github/applications/item_token_scoped_request_builder.go +++ b/pkg/github/applications/item_token_scoped_request_builder.go @@ -23,7 +23,7 @@ func NewItemTokenScopedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemTokenScopedRequestBuilderInternal(urlParams, requestAdapter) } -// Post use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`.You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub Appas the username and password. +// Post use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`.You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication)when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub Appas the username and password. // returns a Authorizationable 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 *ItemTokenScopedRequestBuilder) Post(ctx context.Context, body ItemToken } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Authorizationable), nil } -// ToPostRequestInformation use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`.You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub Appas the username and password. +// ToPostRequestInformation use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specifywhich repositories the token can access and which permissions are granted to thetoken.Invalid tokens will return `404 NOT FOUND`.You must use [Basic Authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication)when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub Appas the username and password. // returns a *RequestInformation when successful func (m *ItemTokenScopedRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTokenScopedPostRequestBodyable, 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/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/enterprises/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go index 906bdb78..5d3e9a31 100644 --- a/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go +++ b/pkg/github/enterprises/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetScopeQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetScopeQueryParameterType(v string) (any, error) { case "runtime": result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go index 382957f5..ae552fb1 100644 --- a/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go +++ b/pkg/github/enterprises/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "resolved": result = RESOLVED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/feeds/feeds_request_builder.go b/pkg/github/feeds/feeds_request_builder.go index 926f4da4..92980657 100644 --- a/pkg/github/feeds/feeds_request_builder.go +++ b/pkg/github/feeds/feeds_request_builder.go @@ -23,7 +23,7 @@ func NewFeedsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb urlParams["request-raw-url"] = rawUrl return NewFeedsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. +// Get lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. // returns a Feedable when successful // [API method documentation] // @@ -42,7 +42,7 @@ func (m *FeedsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2a } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Feedable), nil } -// ToGetRequestInformation lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. +// ToGetRequestInformation lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. // returns a *RequestInformation when successful func (m *FeedsRequestBuilder) 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/issues/get_direction_query_parameter_type.go b/pkg/github/issues/get_direction_query_parameter_type.go index 6aca6ecb..f176c1cc 100644 --- a/pkg/github/issues/get_direction_query_parameter_type.go +++ b/pkg/github/issues/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/issues/get_filter_query_parameter_type.go b/pkg/github/issues/get_filter_query_parameter_type.go index bd35fa09..0c77b959 100644 --- a/pkg/github/issues/get_filter_query_parameter_type.go +++ b/pkg/github/issues/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/issues/get_sort_query_parameter_type.go b/pkg/github/issues/get_sort_query_parameter_type.go index ba962acf..10b7912a 100644 --- a/pkg/github/issues/get_sort_query_parameter_type.go +++ b/pkg/github/issues/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "comments": result = COMMENTS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/issues/get_state_query_parameter_type.go b/pkg/github/issues/get_state_query_parameter_type.go index 55415107..065faf93 100644 --- a/pkg/github/issues/get_state_query_parameter_type.go +++ b/pkg/github/issues/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 526be3bc..b90b2570 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,8 +1,8 @@ { - "descriptionHash": "76CCA426AA01AC716EF1C5B10504B6CAD0B064050C8EF6AE2AA248791B78C0B3E24F5B5446134E560CE2F76F908A8692BD04B80CF9832EECDBC3CAC33F992D27", + "descriptionHash": "3E34EE713ED1909E939D027B191DEF3CD051613CE8B6676AE7B157A6674DD48E9DAAEA0EA440A9B72B1C9907CAFC1BD76ADA8710F5D06361DDADEE35A757D574", "descriptionLocation": "../../../source-generator/schemas/downloaded.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.14.0", + "kiotaVersion": "1.15.0-preview.202405160001", "clientClassName": "ApiClient", "clientNamespaceName": "github.com/octokit/go-sdk/pkg/github/", "language": "Go", diff --git a/pkg/github/markdown/markdown_post_request_body_mode.go b/pkg/github/markdown/markdown_post_request_body_mode.go index 013f3d21..03cab170 100644 --- a/pkg/github/markdown/markdown_post_request_body_mode.go +++ b/pkg/github/markdown/markdown_post_request_body_mode.go @@ -1,7 +1,4 @@ package markdown -import ( - "errors" -) // The rendering mode. type MarkdownPostRequestBody_mode int @@ -21,7 +18,7 @@ func ParseMarkdownPostRequestBody_mode(v string) (any, error) { case "gfm": result = GFM_MARKDOWNPOSTREQUESTBODY_MODE default: - return 0, errors.New("Unknown MarkdownPostRequestBody_mode value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go b/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go index 1504d934..5737fdbc 100644 --- a/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go +++ b/pkg/github/marketplace_listing/accounts_with_account_item_request_builder.go @@ -23,7 +23,7 @@ func NewAccountsWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewAccountsWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a MarketplacePurchaseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 404 status code @@ -48,7 +48,7 @@ func (m *AccountsWithAccount_ItemRequestBuilder) Get(ctx context.Context, reques } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.MarketplacePurchaseable), nil } -// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *AccountsWithAccount_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/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go b/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go index 8d6726ff..ba6cc591 100644 --- a/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go +++ b/pkg/github/marketplace_listing/plans/item/accounts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package accounts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go b/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go index 5ecd106e..e227caf9 100644 --- a/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go +++ b/pkg/github/marketplace_listing/plans/item/accounts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package accounts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go b/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go index 06fe890e..b18f0307 100644 --- a/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go +++ b/pkg/github/marketplace_listing/plans_item_accounts_request_builder.go @@ -11,7 +11,7 @@ import ( type PlansItemAccountsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PlansItemAccountsRequestBuilderGetQueryParameters returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// PlansItemAccountsRequestBuilderGetQueryParameters returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. type PlansItemAccountsRequestBuilderGetQueryParameters struct { // To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. Direction *i56b9d03293585ca583bbb85dc6c217737665c7595f6e6dc578f5a52298ca9b7b.GetDirectionQueryParameterType `uriparametername:"direction"` @@ -35,7 +35,7 @@ func NewPlansItemAccountsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7 urlParams["request-raw-url"] = rawUrl return NewPlansItemAccountsRequestBuilderInternal(urlParams, requestAdapter) } -// Get returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a []MarketplacePurchaseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 404 status code @@ -65,7 +65,7 @@ func (m *PlansItemAccountsRequestBuilder) Get(ctx context.Context, requestConfig } return val, nil } -// ToGetRequestInformation returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *PlansItemAccountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansItemAccountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/marketplace_listing/plans_request_builder.go b/pkg/github/marketplace_listing/plans_request_builder.go index ee062cc0..b5b6b682 100644 --- a/pkg/github/marketplace_listing/plans_request_builder.go +++ b/pkg/github/marketplace_listing/plans_request_builder.go @@ -11,7 +11,7 @@ import ( type PlansRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// PlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. type PlansRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -41,7 +41,7 @@ func NewPlansRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb urlParams["request-raw-url"] = rawUrl return NewPlansRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a []MarketplaceListingPlanable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 404 status code @@ -69,7 +69,7 @@ func (m *PlansRequestBuilder) Get(ctx context.Context, requestConfiguration *i2a } return val, nil } -// ToGetRequestInformation lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *PlansRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PlansRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go index 8d6726ff..ba6cc591 100644 --- a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go +++ b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package accounts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go index 5ecd106e..e227caf9 100644 --- a/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go +++ b/pkg/github/marketplace_listing/stubbed/plans/item/accounts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package accounts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go b/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go index dc57e864..d98c3a14 100644 --- a/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go +++ b/pkg/github/marketplace_listing/stubbed_accounts_with_account_item_request_builder.go @@ -23,7 +23,7 @@ func NewStubbedAccountsWithAccount_ItemRequestBuilder(rawUrl string, requestAdap urlParams["request-raw-url"] = rawUrl return NewStubbedAccountsWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a MarketplacePurchaseable when successful // returns a BasicError error when the service returns a 401 status code // [API method documentation] @@ -46,7 +46,7 @@ func (m *StubbedAccountsWithAccount_ItemRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.MarketplacePurchaseable), nil } -// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *StubbedAccountsWithAccount_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/marketplace_listing/stubbed_plans_item_accounts_request_builder.go b/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go index bef4f44b..50802218 100644 --- a/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go +++ b/pkg/github/marketplace_listing/stubbed_plans_item_accounts_request_builder.go @@ -11,7 +11,7 @@ import ( type StubbedPlansItemAccountsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// StubbedPlansItemAccountsRequestBuilderGetQueryParameters returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// StubbedPlansItemAccountsRequestBuilderGetQueryParameters returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. type StubbedPlansItemAccountsRequestBuilderGetQueryParameters struct { // To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. Direction *ib2201bb0242d254ae6bcc1c5b32345ae2ac3863ba8e87cb7a02fb6b325aff8aa.GetDirectionQueryParameterType `uriparametername:"direction"` @@ -35,7 +35,7 @@ func NewStubbedPlansItemAccountsRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewStubbedPlansItemAccountsRequestBuilderInternal(urlParams, requestAdapter) } -// Get returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a []MarketplacePurchaseable when successful // returns a BasicError error when the service returns a 401 status code // [API method documentation] @@ -61,7 +61,7 @@ func (m *StubbedPlansItemAccountsRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// ToGetRequestInformation returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *StubbedPlansItemAccountsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansItemAccountsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/marketplace_listing/stubbed_plans_request_builder.go b/pkg/github/marketplace_listing/stubbed_plans_request_builder.go index 9b410b43..ab7e834e 100644 --- a/pkg/github/marketplace_listing/stubbed_plans_request_builder.go +++ b/pkg/github/marketplace_listing/stubbed_plans_request_builder.go @@ -11,7 +11,7 @@ import ( type StubbedPlansRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// StubbedPlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// StubbedPlansRequestBuilderGetQueryParameters lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. type StubbedPlansRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -41,7 +41,7 @@ func NewStubbedPlansRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewStubbedPlansRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// Get lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a []MarketplaceListingPlanable when successful // returns a BasicError error when the service returns a 401 status code // [API method documentation] @@ -67,7 +67,7 @@ func (m *StubbedPlansRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// ToGetRequestInformation lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. +// ToGetRequestInformation lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. // returns a *RequestInformation when successful func (m *StubbedPlansRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[StubbedPlansRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/models/actions_default_workflow_permissions.go b/pkg/github/models/actions_default_workflow_permissions.go index 7efe4c0c..b3af872e 100644 --- a/pkg/github/models/actions_default_workflow_permissions.go +++ b/pkg/github/models/actions_default_workflow_permissions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default workflow permissions granted to the GITHUB_TOKEN when running workflows. type ActionsDefaultWorkflowPermissions int @@ -21,7 +18,7 @@ func ParseActionsDefaultWorkflowPermissions(v string) (any, error) { case "write": result = WRITE_ACTIONSDEFAULTWORKFLOWPERMISSIONS default: - return 0, errors.New("Unknown ActionsDefaultWorkflowPermissions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/actions_workflow_access_to_repository_access_level.go b/pkg/github/models/actions_workflow_access_to_repository_access_level.go index 83a37bde..97eca844 100644 --- a/pkg/github/models/actions_workflow_access_to_repository_access_level.go +++ b/pkg/github/models/actions_workflow_access_to_repository_access_level.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Defines the level of access that workflows outside of the repository have to actions and reusable workflows within therepository.`none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. type ActionsWorkflowAccessToRepository_access_level int @@ -24,7 +21,7 @@ func ParseActionsWorkflowAccessToRepository_access_level(v string) (any, error) case "organization": result = ORGANIZATION_ACTIONSWORKFLOWACCESSTOREPOSITORY_ACCESS_LEVEL default: - return 0, errors.New("Unknown ActionsWorkflowAccessToRepository_access_level value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/activity_activity_type.go b/pkg/github/models/activity_activity_type.go index 3ff3b9c8..65789417 100644 --- a/pkg/github/models/activity_activity_type.go +++ b/pkg/github/models/activity_activity_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of the activity that was performed. type Activity_activity_type int @@ -33,7 +30,7 @@ func ParseActivity_activity_type(v string) (any, error) { case "merge_queue_merge": result = MERGE_QUEUE_MERGE_ACTIVITY_ACTIVITY_TYPE default: - return 0, errors.New("Unknown Activity_activity_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/allowed_actions.go b/pkg/github/models/allowed_actions.go index dd5c04b0..c609fd36 100644 --- a/pkg/github/models/allowed_actions.go +++ b/pkg/github/models/allowed_actions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The permissions policy that controls the actions and reusable workflows that are allowed to run. type AllowedActions int @@ -24,7 +21,7 @@ func ParseAllowedActions(v string) (any, error) { case "selected": result = SELECTED_ALLOWEDACTIONS default: - return 0, errors.New("Unknown AllowedActions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/api_overview.go b/pkg/github/models/api_overview.go index d8c4d006..bc68b0f6 100644 --- a/pkg/github/models/api_overview.go +++ b/pkg/github/models/api_overview.go @@ -8,6 +8,8 @@ import ( type ApiOverview struct { // The actions property actions []string + // The actions_macos property + actions_macos []string // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The api property @@ -54,6 +56,11 @@ func CreateApiOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a func (m *ApiOverview) GetActions()([]string) { return m.actions } +// GetActionsMacos gets the actions_macos property value. The actions_macos property +// returns a []string when successful +func (m *ApiOverview) GetActionsMacos()([]string) { + return m.actions_macos +} // 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) GetAdditionalData()(map[string]any) { @@ -94,6 +101,22 @@ func (m *ApiOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["actions_macos"] = 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.SetActionsMacos(res) + } + return nil + } res["api"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") if err != nil { @@ -344,6 +367,12 @@ func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + if m.GetActionsMacos() != nil { + err := writer.WriteCollectionOfStringValues("actions_macos", m.GetActionsMacos()) + if err != nil { + return err + } + } if m.GetApi() != nil { err := writer.WriteCollectionOfStringValues("api", m.GetApi()) if err != nil { @@ -434,6 +463,10 @@ func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 func (m *ApiOverview) SetActions(value []string)() { m.actions = value } +// SetActionsMacos sets the actions_macos property value. The actions_macos property +func (m *ApiOverview) SetActionsMacos(value []string)() { + m.actions_macos = 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) SetAdditionalData(value map[string]any)() { m.additionalData = value @@ -494,6 +527,7 @@ type ApiOverviewable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetActions()([]string) + GetActionsMacos()([]string) GetApi()([]string) GetDependabot()([]string) GetDomains()(ApiOverview_domainsable) @@ -508,6 +542,7 @@ type ApiOverviewable interface { GetVerifiablePasswordAuthentication()(*bool) GetWeb()([]string) SetActions(value []string)() + SetActionsMacos(value []string)() SetApi(value []string)() SetDependabot(value []string)() SetDomains(value ApiOverview_domainsable)() diff --git a/pkg/github/models/app_permissions_actions.go b/pkg/github/models/app_permissions_actions.go index 937956a9..60cd40fc 100644 --- a/pkg/github/models/app_permissions_actions.go +++ b/pkg/github/models/app_permissions_actions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. type AppPermissions_actions int @@ -21,7 +18,7 @@ func ParseAppPermissions_actions(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ACTIONS default: - return 0, errors.New("Unknown AppPermissions_actions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_administration.go b/pkg/github/models/app_permissions_administration.go index 60f54d0f..a092bec6 100644 --- a/pkg/github/models/app_permissions_administration.go +++ b/pkg/github/models/app_permissions_administration.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. type AppPermissions_administration int @@ -21,7 +18,7 @@ func ParseAppPermissions_administration(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ADMINISTRATION default: - return 0, errors.New("Unknown AppPermissions_administration value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_checks.go b/pkg/github/models/app_permissions_checks.go index f22fcf50..f118261a 100644 --- a/pkg/github/models/app_permissions_checks.go +++ b/pkg/github/models/app_permissions_checks.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for checks on code. type AppPermissions_checks int @@ -21,7 +18,7 @@ func ParseAppPermissions_checks(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_CHECKS default: - return 0, errors.New("Unknown AppPermissions_checks value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_codespaces.go b/pkg/github/models/app_permissions_codespaces.go index 1d49364d..9a671507 100644 --- a/pkg/github/models/app_permissions_codespaces.go +++ b/pkg/github/models/app_permissions_codespaces.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to create, edit, delete, and list Codespaces. type AppPermissions_codespaces int @@ -21,7 +18,7 @@ func ParseAppPermissions_codespaces(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_CODESPACES default: - return 0, errors.New("Unknown AppPermissions_codespaces value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_contents.go b/pkg/github/models/app_permissions_contents.go index b3eaf8c6..b93d1c8f 100644 --- a/pkg/github/models/app_permissions_contents.go +++ b/pkg/github/models/app_permissions_contents.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. type AppPermissions_contents int @@ -21,7 +18,7 @@ func ParseAppPermissions_contents(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_CONTENTS default: - return 0, errors.New("Unknown AppPermissions_contents value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_dependabot_secrets.go b/pkg/github/models/app_permissions_dependabot_secrets.go index cfbcaa34..c6094c00 100644 --- a/pkg/github/models/app_permissions_dependabot_secrets.go +++ b/pkg/github/models/app_permissions_dependabot_secrets.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The leve of permission to grant the access token to manage Dependabot secrets. type AppPermissions_dependabot_secrets int @@ -21,7 +18,7 @@ func ParseAppPermissions_dependabot_secrets(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_DEPENDABOT_SECRETS default: - return 0, errors.New("Unknown AppPermissions_dependabot_secrets value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_deployments.go b/pkg/github/models/app_permissions_deployments.go index cff72b3b..3f318f2a 100644 --- a/pkg/github/models/app_permissions_deployments.go +++ b/pkg/github/models/app_permissions_deployments.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for deployments and deployment statuses. type AppPermissions_deployments int @@ -21,7 +18,7 @@ func ParseAppPermissions_deployments(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_DEPLOYMENTS default: - return 0, errors.New("Unknown AppPermissions_deployments value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_email_addresses.go b/pkg/github/models/app_permissions_email_addresses.go index 766f2869..a62a21c7 100644 --- a/pkg/github/models/app_permissions_email_addresses.go +++ b/pkg/github/models/app_permissions_email_addresses.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage the email addresses belonging to a user. type AppPermissions_email_addresses int @@ -21,7 +18,7 @@ func ParseAppPermissions_email_addresses(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_EMAIL_ADDRESSES default: - return 0, errors.New("Unknown AppPermissions_email_addresses value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_environments.go b/pkg/github/models/app_permissions_environments.go index 86e3eb53..e5e16e9f 100644 --- a/pkg/github/models/app_permissions_environments.go +++ b/pkg/github/models/app_permissions_environments.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for managing repository environments. type AppPermissions_environments int @@ -21,7 +18,7 @@ func ParseAppPermissions_environments(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ENVIRONMENTS default: - return 0, errors.New("Unknown AppPermissions_environments value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_followers.go b/pkg/github/models/app_permissions_followers.go index 9f86fb7a..63d0bf79 100644 --- a/pkg/github/models/app_permissions_followers.go +++ b/pkg/github/models/app_permissions_followers.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage the followers belonging to a user. type AppPermissions_followers int @@ -21,7 +18,7 @@ func ParseAppPermissions_followers(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_FOLLOWERS default: - return 0, errors.New("Unknown AppPermissions_followers value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_git_ssh_keys.go b/pkg/github/models/app_permissions_git_ssh_keys.go index 05993d25..de4850a1 100644 --- a/pkg/github/models/app_permissions_git_ssh_keys.go +++ b/pkg/github/models/app_permissions_git_ssh_keys.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage git SSH keys. type AppPermissions_git_ssh_keys int @@ -21,7 +18,7 @@ func ParseAppPermissions_git_ssh_keys(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_GIT_SSH_KEYS default: - return 0, errors.New("Unknown AppPermissions_git_ssh_keys value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_gpg_keys.go b/pkg/github/models/app_permissions_gpg_keys.go index 8da34fce..284984f1 100644 --- a/pkg/github/models/app_permissions_gpg_keys.go +++ b/pkg/github/models/app_permissions_gpg_keys.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage GPG keys belonging to a user. type AppPermissions_gpg_keys int @@ -21,7 +18,7 @@ func ParseAppPermissions_gpg_keys(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_GPG_KEYS default: - return 0, errors.New("Unknown AppPermissions_gpg_keys value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_interaction_limits.go b/pkg/github/models/app_permissions_interaction_limits.go index e167e1e3..95bcc182 100644 --- a/pkg/github/models/app_permissions_interaction_limits.go +++ b/pkg/github/models/app_permissions_interaction_limits.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage interaction limits on a repository. type AppPermissions_interaction_limits int @@ -21,7 +18,7 @@ func ParseAppPermissions_interaction_limits(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_INTERACTION_LIMITS default: - return 0, errors.New("Unknown AppPermissions_interaction_limits value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_issues.go b/pkg/github/models/app_permissions_issues.go index 1eacc87c..7250708a 100644 --- a/pkg/github/models/app_permissions_issues.go +++ b/pkg/github/models/app_permissions_issues.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. type AppPermissions_issues int @@ -21,7 +18,7 @@ func ParseAppPermissions_issues(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ISSUES default: - return 0, errors.New("Unknown AppPermissions_issues value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_members.go b/pkg/github/models/app_permissions_members.go index 28b59209..8003ce0a 100644 --- a/pkg/github/models/app_permissions_members.go +++ b/pkg/github/models/app_permissions_members.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for organization teams and members. type AppPermissions_members int @@ -21,7 +18,7 @@ func ParseAppPermissions_members(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_MEMBERS default: - return 0, errors.New("Unknown AppPermissions_members value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_metadata.go b/pkg/github/models/app_permissions_metadata.go index 7d7fd3ec..fe06362c 100644 --- a/pkg/github/models/app_permissions_metadata.go +++ b/pkg/github/models/app_permissions_metadata.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. type AppPermissions_metadata int @@ -21,7 +18,7 @@ func ParseAppPermissions_metadata(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_METADATA default: - return 0, errors.New("Unknown AppPermissions_metadata value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_administration.go b/pkg/github/models/app_permissions_organization_administration.go index 6adff853..0b1e6e52 100644 --- a/pkg/github/models/app_permissions_organization_administration.go +++ b/pkg/github/models/app_permissions_organization_administration.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage access to an organization. type AppPermissions_organization_administration int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_administration(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_ADMINISTRATION default: - return 0, errors.New("Unknown AppPermissions_organization_administration value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_announcement_banners.go b/pkg/github/models/app_permissions_organization_announcement_banners.go index 087b38dd..62d575cb 100644 --- a/pkg/github/models/app_permissions_organization_announcement_banners.go +++ b/pkg/github/models/app_permissions_organization_announcement_banners.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage announcement banners for an organization. type AppPermissions_organization_announcement_banners int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_announcement_banners(v string) (any, error case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_ANNOUNCEMENT_BANNERS default: - return 0, errors.New("Unknown AppPermissions_organization_announcement_banners value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_copilot_seat_management.go b/pkg/github/models/app_permissions_organization_copilot_seat_management.go index acc122be..ef8aa5d6 100644 --- a/pkg/github/models/app_permissions_organization_copilot_seat_management.go +++ b/pkg/github/models/app_permissions_organization_copilot_seat_management.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. type AppPermissions_organization_copilot_seat_management int @@ -18,7 +15,7 @@ func ParseAppPermissions_organization_copilot_seat_management(v string) (any, er case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT default: - return 0, errors.New("Unknown AppPermissions_organization_copilot_seat_management value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_custom_org_roles.go b/pkg/github/models/app_permissions_organization_custom_org_roles.go index 146db921..67c679c3 100644 --- a/pkg/github/models/app_permissions_organization_custom_org_roles.go +++ b/pkg/github/models/app_permissions_organization_custom_org_roles.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for custom organization roles management. type AppPermissions_organization_custom_org_roles int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_custom_org_roles(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES default: - return 0, errors.New("Unknown AppPermissions_organization_custom_org_roles value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_custom_properties.go b/pkg/github/models/app_permissions_organization_custom_properties.go index 57840ae0..b6eaf515 100644 --- a/pkg/github/models/app_permissions_organization_custom_properties.go +++ b/pkg/github/models/app_permissions_organization_custom_properties.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for custom property management. type AppPermissions_organization_custom_properties int @@ -24,7 +21,7 @@ func ParseAppPermissions_organization_custom_properties(v string) (any, error) { case "admin": result = ADMIN_APPPERMISSIONS_ORGANIZATION_CUSTOM_PROPERTIES default: - return 0, errors.New("Unknown AppPermissions_organization_custom_properties value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_custom_roles.go b/pkg/github/models/app_permissions_organization_custom_roles.go index 3f121939..28216655 100644 --- a/pkg/github/models/app_permissions_organization_custom_roles.go +++ b/pkg/github/models/app_permissions_organization_custom_roles.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for custom repository roles management. type AppPermissions_organization_custom_roles int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_custom_roles(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ROLES default: - return 0, errors.New("Unknown AppPermissions_organization_custom_roles value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_events.go b/pkg/github/models/app_permissions_organization_events.go index 995b1b56..dc449104 100644 --- a/pkg/github/models/app_permissions_organization_events.go +++ b/pkg/github/models/app_permissions_organization_events.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view events triggered by an activity in an organization. type AppPermissions_organization_events int @@ -18,7 +15,7 @@ func ParseAppPermissions_organization_events(v string) (any, error) { case "read": result = READ_APPPERMISSIONS_ORGANIZATION_EVENTS default: - return 0, errors.New("Unknown AppPermissions_organization_events value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_hooks.go b/pkg/github/models/app_permissions_organization_hooks.go index 64c4c971..98aaaf8d 100644 --- a/pkg/github/models/app_permissions_organization_hooks.go +++ b/pkg/github/models/app_permissions_organization_hooks.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage the post-receive hooks for an organization. type AppPermissions_organization_hooks int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_hooks(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_HOOKS default: - return 0, errors.New("Unknown AppPermissions_organization_hooks value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_packages.go b/pkg/github/models/app_permissions_organization_packages.go index 34dc2e45..7462138c 100644 --- a/pkg/github/models/app_permissions_organization_packages.go +++ b/pkg/github/models/app_permissions_organization_packages.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for organization packages published to GitHub Packages. type AppPermissions_organization_packages int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_packages(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_PACKAGES default: - return 0, errors.New("Unknown AppPermissions_organization_packages value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_personal_access_token_requests.go b/pkg/github/models/app_permissions_organization_personal_access_token_requests.go index 3ff20f68..fd8ec7e7 100644 --- a/pkg/github/models/app_permissions_organization_personal_access_token_requests.go +++ b/pkg/github/models/app_permissions_organization_personal_access_token_requests.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. type AppPermissions_organization_personal_access_token_requests int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_personal_access_token_requests(v string) ( case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKEN_REQUESTS default: - return 0, errors.New("Unknown AppPermissions_organization_personal_access_token_requests value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_personal_access_tokens.go b/pkg/github/models/app_permissions_organization_personal_access_tokens.go index 499db17b..c0cd9ef7 100644 --- a/pkg/github/models/app_permissions_organization_personal_access_tokens.go +++ b/pkg/github/models/app_permissions_organization_personal_access_tokens.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. type AppPermissions_organization_personal_access_tokens int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_personal_access_tokens(v string) (any, err case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_PERSONAL_ACCESS_TOKENS default: - return 0, errors.New("Unknown AppPermissions_organization_personal_access_tokens value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_plan.go b/pkg/github/models/app_permissions_organization_plan.go index ec5ae092..19292053 100644 --- a/pkg/github/models/app_permissions_organization_plan.go +++ b/pkg/github/models/app_permissions_organization_plan.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for viewing an organization's plan. type AppPermissions_organization_plan int @@ -18,7 +15,7 @@ func ParseAppPermissions_organization_plan(v string) (any, error) { case "read": result = READ_APPPERMISSIONS_ORGANIZATION_PLAN default: - return 0, errors.New("Unknown AppPermissions_organization_plan value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_projects.go b/pkg/github/models/app_permissions_organization_projects.go index 580043ab..17911c3d 100644 --- a/pkg/github/models/app_permissions_organization_projects.go +++ b/pkg/github/models/app_permissions_organization_projects.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage organization projects and projects beta (where available). type AppPermissions_organization_projects int @@ -24,7 +21,7 @@ func ParseAppPermissions_organization_projects(v string) (any, error) { case "admin": result = ADMIN_APPPERMISSIONS_ORGANIZATION_PROJECTS default: - return 0, errors.New("Unknown AppPermissions_organization_projects value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_secrets.go b/pkg/github/models/app_permissions_organization_secrets.go index ee4c386b..6601cc7a 100644 --- a/pkg/github/models/app_permissions_organization_secrets.go +++ b/pkg/github/models/app_permissions_organization_secrets.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage organization secrets. type AppPermissions_organization_secrets int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_secrets(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_SECRETS default: - return 0, errors.New("Unknown AppPermissions_organization_secrets value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_self_hosted_runners.go b/pkg/github/models/app_permissions_organization_self_hosted_runners.go index 842862ca..f284c91c 100644 --- a/pkg/github/models/app_permissions_organization_self_hosted_runners.go +++ b/pkg/github/models/app_permissions_organization_self_hosted_runners.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. type AppPermissions_organization_self_hosted_runners int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_self_hosted_runners(v string) (any, error) case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_SELF_HOSTED_RUNNERS default: - return 0, errors.New("Unknown AppPermissions_organization_self_hosted_runners value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_organization_user_blocking.go b/pkg/github/models/app_permissions_organization_user_blocking.go index 9e2c415a..24f1ba9e 100644 --- a/pkg/github/models/app_permissions_organization_user_blocking.go +++ b/pkg/github/models/app_permissions_organization_user_blocking.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage users blocked by the organization. type AppPermissions_organization_user_blocking int @@ -21,7 +18,7 @@ func ParseAppPermissions_organization_user_blocking(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_ORGANIZATION_USER_BLOCKING default: - return 0, errors.New("Unknown AppPermissions_organization_user_blocking value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_packages.go b/pkg/github/models/app_permissions_packages.go index fd699035..bea42378 100644 --- a/pkg/github/models/app_permissions_packages.go +++ b/pkg/github/models/app_permissions_packages.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for packages published to GitHub Packages. type AppPermissions_packages int @@ -21,7 +18,7 @@ func ParseAppPermissions_packages(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_PACKAGES default: - return 0, errors.New("Unknown AppPermissions_packages value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_pages.go b/pkg/github/models/app_permissions_pages.go index ac6289fd..2f25a1d3 100644 --- a/pkg/github/models/app_permissions_pages.go +++ b/pkg/github/models/app_permissions_pages.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. type AppPermissions_pages int @@ -21,7 +18,7 @@ func ParseAppPermissions_pages(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_PAGES default: - return 0, errors.New("Unknown AppPermissions_pages value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_profile.go b/pkg/github/models/app_permissions_profile.go index 6196c198..8e5e3193 100644 --- a/pkg/github/models/app_permissions_profile.go +++ b/pkg/github/models/app_permissions_profile.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage the profile settings belonging to a user. type AppPermissions_profile int @@ -18,7 +15,7 @@ func ParseAppPermissions_profile(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_PROFILE default: - return 0, errors.New("Unknown AppPermissions_profile value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_pull_requests.go b/pkg/github/models/app_permissions_pull_requests.go index b9530f2b..1c36c0e2 100644 --- a/pkg/github/models/app_permissions_pull_requests.go +++ b/pkg/github/models/app_permissions_pull_requests.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. type AppPermissions_pull_requests int @@ -21,7 +18,7 @@ func ParseAppPermissions_pull_requests(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_PULL_REQUESTS default: - return 0, errors.New("Unknown AppPermissions_pull_requests value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_repository_custom_properties.go b/pkg/github/models/app_permissions_repository_custom_properties.go index 9f408afb..9a35f61f 100644 --- a/pkg/github/models/app_permissions_repository_custom_properties.go +++ b/pkg/github/models/app_permissions_repository_custom_properties.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. type AppPermissions_repository_custom_properties int @@ -21,7 +18,7 @@ func ParseAppPermissions_repository_custom_properties(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES default: - return 0, errors.New("Unknown AppPermissions_repository_custom_properties value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_repository_hooks.go b/pkg/github/models/app_permissions_repository_hooks.go index f7b50277..7ac98463 100644 --- a/pkg/github/models/app_permissions_repository_hooks.go +++ b/pkg/github/models/app_permissions_repository_hooks.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage the post-receive hooks for a repository. type AppPermissions_repository_hooks int @@ -21,7 +18,7 @@ func ParseAppPermissions_repository_hooks(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_REPOSITORY_HOOKS default: - return 0, errors.New("Unknown AppPermissions_repository_hooks value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_repository_projects.go b/pkg/github/models/app_permissions_repository_projects.go index 0de65e09..54aa40f7 100644 --- a/pkg/github/models/app_permissions_repository_projects.go +++ b/pkg/github/models/app_permissions_repository_projects.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage repository projects, columns, and cards. type AppPermissions_repository_projects int @@ -24,7 +21,7 @@ func ParseAppPermissions_repository_projects(v string) (any, error) { case "admin": result = ADMIN_APPPERMISSIONS_REPOSITORY_PROJECTS default: - return 0, errors.New("Unknown AppPermissions_repository_projects value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_secret_scanning_alerts.go b/pkg/github/models/app_permissions_secret_scanning_alerts.go index b31cfceb..64434783 100644 --- a/pkg/github/models/app_permissions_secret_scanning_alerts.go +++ b/pkg/github/models/app_permissions_secret_scanning_alerts.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage secret scanning alerts. type AppPermissions_secret_scanning_alerts int @@ -21,7 +18,7 @@ func ParseAppPermissions_secret_scanning_alerts(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_SECRET_SCANNING_ALERTS default: - return 0, errors.New("Unknown AppPermissions_secret_scanning_alerts value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_secrets.go b/pkg/github/models/app_permissions_secrets.go index 69e423c8..a2af1324 100644 --- a/pkg/github/models/app_permissions_secrets.go +++ b/pkg/github/models/app_permissions_secrets.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage repository secrets. type AppPermissions_secrets int @@ -21,7 +18,7 @@ func ParseAppPermissions_secrets(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_SECRETS default: - return 0, errors.New("Unknown AppPermissions_secrets value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_security_events.go b/pkg/github/models/app_permissions_security_events.go index 2ec318f7..648cdc73 100644 --- a/pkg/github/models/app_permissions_security_events.go +++ b/pkg/github/models/app_permissions_security_events.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to view and manage security events like code scanning alerts. type AppPermissions_security_events int @@ -21,7 +18,7 @@ func ParseAppPermissions_security_events(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_SECURITY_EVENTS default: - return 0, errors.New("Unknown AppPermissions_security_events value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_single_file.go b/pkg/github/models/app_permissions_single_file.go index c8abbe34..33f3fcf2 100644 --- a/pkg/github/models/app_permissions_single_file.go +++ b/pkg/github/models/app_permissions_single_file.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage just a single file. type AppPermissions_single_file int @@ -21,7 +18,7 @@ func ParseAppPermissions_single_file(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_SINGLE_FILE default: - return 0, errors.New("Unknown AppPermissions_single_file value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_starring.go b/pkg/github/models/app_permissions_starring.go index e5b4320e..d569783a 100644 --- a/pkg/github/models/app_permissions_starring.go +++ b/pkg/github/models/app_permissions_starring.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to list and manage repositories a user is starring. type AppPermissions_starring int @@ -21,7 +18,7 @@ func ParseAppPermissions_starring(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_STARRING default: - return 0, errors.New("Unknown AppPermissions_starring value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_statuses.go b/pkg/github/models/app_permissions_statuses.go index e72c2065..dc4d8380 100644 --- a/pkg/github/models/app_permissions_statuses.go +++ b/pkg/github/models/app_permissions_statuses.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token for commit statuses. type AppPermissions_statuses int @@ -21,7 +18,7 @@ func ParseAppPermissions_statuses(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_STATUSES default: - return 0, errors.New("Unknown AppPermissions_statuses value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_team_discussions.go b/pkg/github/models/app_permissions_team_discussions.go index 32b533a2..df47366c 100644 --- a/pkg/github/models/app_permissions_team_discussions.go +++ b/pkg/github/models/app_permissions_team_discussions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage team discussions and related comments. type AppPermissions_team_discussions int @@ -21,7 +18,7 @@ func ParseAppPermissions_team_discussions(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_TEAM_DISCUSSIONS default: - return 0, errors.New("Unknown AppPermissions_team_discussions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_vulnerability_alerts.go b/pkg/github/models/app_permissions_vulnerability_alerts.go index 2c051c54..aec932b2 100644 --- a/pkg/github/models/app_permissions_vulnerability_alerts.go +++ b/pkg/github/models/app_permissions_vulnerability_alerts.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to manage Dependabot alerts. type AppPermissions_vulnerability_alerts int @@ -21,7 +18,7 @@ func ParseAppPermissions_vulnerability_alerts(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_VULNERABILITY_ALERTS default: - return 0, errors.New("Unknown AppPermissions_vulnerability_alerts value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/app_permissions_workflows.go b/pkg/github/models/app_permissions_workflows.go index 5cb7f73f..eda68e3b 100644 --- a/pkg/github/models/app_permissions_workflows.go +++ b/pkg/github/models/app_permissions_workflows.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of permission to grant the access token to update GitHub Actions workflow files. type AppPermissions_workflows int @@ -18,7 +15,7 @@ func ParseAppPermissions_workflows(v string) (any, error) { case "write": result = WRITE_APPPERMISSIONS_WORKFLOWS default: - return 0, errors.New("Unknown AppPermissions_workflows value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/authentication_token_repository_selection.go b/pkg/github/models/authentication_token_repository_selection.go index 24215fe3..387065c4 100644 --- a/pkg/github/models/authentication_token_repository_selection.go +++ b/pkg/github/models/authentication_token_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Describe whether all repositories have been selected or there's a selection involved type AuthenticationToken_repository_selection int @@ -21,7 +18,7 @@ func ParseAuthenticationToken_repository_selection(v string) (any, error) { case "selected": result = SELECTED_AUTHENTICATIONTOKEN_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown AuthenticationToken_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/author_association.go b/pkg/github/models/author_association.go index 5904dc91..66ea49fa 100644 --- a/pkg/github/models/author_association.go +++ b/pkg/github/models/author_association.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // How the author is associated with the repository. type AuthorAssociation int @@ -39,7 +36,7 @@ func ParseAuthorAssociation(v string) (any, error) { case "OWNER": result = OWNER_AUTHORASSOCIATION default: - return 0, errors.New("Unknown AuthorAssociation value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/auto_merge_merge_method.go b/pkg/github/models/auto_merge_merge_method.go index 7060adf1..54931960 100644 --- a/pkg/github/models/auto_merge_merge_method.go +++ b/pkg/github/models/auto_merge_merge_method.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The merge method to use. type AutoMerge_merge_method int @@ -24,7 +21,7 @@ func ParseAutoMerge_merge_method(v string) (any, error) { case "rebase": result = REBASE_AUTOMERGE_MERGE_METHOD default: - return 0, errors.New("Unknown AutoMerge_merge_method value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/check_run_conclusion.go b/pkg/github/models/check_run_conclusion.go index 9a0de6e5..d414323d 100644 --- a/pkg/github/models/check_run_conclusion.go +++ b/pkg/github/models/check_run_conclusion.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type CheckRun_conclusion int const ( @@ -35,7 +32,7 @@ func ParseCheckRun_conclusion(v string) (any, error) { case "action_required": result = ACTION_REQUIRED_CHECKRUN_CONCLUSION default: - return 0, errors.New("Unknown CheckRun_conclusion value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/check_run_status.go b/pkg/github/models/check_run_status.go index 097adf28..2314d9f7 100644 --- a/pkg/github/models/check_run_status.go +++ b/pkg/github/models/check_run_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. type CheckRun_status int @@ -33,7 +30,7 @@ func ParseCheckRun_status(v string) (any, error) { case "pending": result = PENDING_CHECKRUN_STATUS default: - return 0, errors.New("Unknown CheckRun_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/check_suite_conclusion.go b/pkg/github/models/check_suite_conclusion.go index 2ca71bb6..5ef4132d 100644 --- a/pkg/github/models/check_suite_conclusion.go +++ b/pkg/github/models/check_suite_conclusion.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type CheckSuite_conclusion int const ( @@ -41,7 +38,7 @@ func ParseCheckSuite_conclusion(v string) (any, error) { case "stale": result = STALE_CHECKSUITE_CONCLUSION default: - return 0, errors.New("Unknown CheckSuite_conclusion value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/check_suite_status.go b/pkg/github/models/check_suite_status.go index d203b469..282eb79e 100644 --- a/pkg/github/models/check_suite_status.go +++ b/pkg/github/models/check_suite_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites. type CheckSuite_status int @@ -33,7 +30,7 @@ func ParseCheckSuite_status(v string) (any, error) { case "pending": result = PENDING_CHECKSUITE_STATUS default: - return 0, errors.New("Unknown CheckSuite_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/classroom_assignment_type.go b/pkg/github/models/classroom_assignment_type.go index b4b65e8b..6ab635b9 100644 --- a/pkg/github/models/classroom_assignment_type.go +++ b/pkg/github/models/classroom_assignment_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether it's a group assignment or individual assignment. type ClassroomAssignment_type int @@ -21,7 +18,7 @@ func ParseClassroomAssignment_type(v string) (any, error) { case "group": result = GROUP_CLASSROOMASSIGNMENT_TYPE default: - return 0, errors.New("Unknown ClassroomAssignment_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_classification.go b/pkg/github/models/code_scanning_alert_classification.go index b3b2d7ef..552c5a6e 100644 --- a/pkg/github/models/code_scanning_alert_classification.go +++ b/pkg/github/models/code_scanning_alert_classification.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // A classification of the file. For example to identify it as generated. type CodeScanningAlertClassification int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertClassification(v string) (any, error) { case "library": result = LIBRARY_CODESCANNINGALERTCLASSIFICATION default: - return 0, errors.New("Unknown CodeScanningAlertClassification value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_dismissed_reason.go b/pkg/github/models/code_scanning_alert_dismissed_reason.go index 1f4a23be..049d58d9 100644 --- a/pkg/github/models/code_scanning_alert_dismissed_reason.go +++ b/pkg/github/models/code_scanning_alert_dismissed_reason.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // **Required when the state is dismissed.** The reason for dismissing or closing the alert. type CodeScanningAlertDismissedReason int @@ -24,7 +21,7 @@ func ParseCodeScanningAlertDismissedReason(v string) (any, error) { case "used in tests": result = USEDINTESTS_CODESCANNINGALERTDISMISSEDREASON default: - return 0, errors.New("Unknown CodeScanningAlertDismissedReason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_rule_security_severity_level.go b/pkg/github/models/code_scanning_alert_rule_security_severity_level.go index 9119dc4b..7d847037 100644 --- a/pkg/github/models/code_scanning_alert_rule_security_severity_level.go +++ b/pkg/github/models/code_scanning_alert_rule_security_severity_level.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The security severity of the alert. type CodeScanningAlertRule_security_severity_level int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertRule_security_severity_level(v string) (any, error) { case "critical": result = CRITICAL_CODESCANNINGALERTRULE_SECURITY_SEVERITY_LEVEL default: - return 0, errors.New("Unknown CodeScanningAlertRule_security_severity_level value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_rule_severity.go b/pkg/github/models/code_scanning_alert_rule_severity.go index 179b9d7e..a1de689f 100644 --- a/pkg/github/models/code_scanning_alert_rule_severity.go +++ b/pkg/github/models/code_scanning_alert_rule_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the alert. type CodeScanningAlertRule_severity int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertRule_severity(v string) (any, error) { case "error": result = ERROR_CODESCANNINGALERTRULE_SEVERITY default: - return 0, errors.New("Unknown CodeScanningAlertRule_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go b/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go index ae3e8a32..0ff8ff86 100644 --- a/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go +++ b/pkg/github/models/code_scanning_alert_rule_summary_security_severity_level.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The security severity of the alert. type CodeScanningAlertRuleSummary_security_severity_level int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertRuleSummary_security_severity_level(v string) (any, e case "critical": result = CRITICAL_CODESCANNINGALERTRULESUMMARY_SECURITY_SEVERITY_LEVEL default: - return 0, errors.New("Unknown CodeScanningAlertRuleSummary_security_severity_level value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_rule_summary_severity.go b/pkg/github/models/code_scanning_alert_rule_summary_severity.go index 70a12844..6da60f6a 100644 --- a/pkg/github/models/code_scanning_alert_rule_summary_severity.go +++ b/pkg/github/models/code_scanning_alert_rule_summary_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the alert. type CodeScanningAlertRuleSummary_severity int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertRuleSummary_severity(v string) (any, error) { case "error": result = ERROR_CODESCANNINGALERTRULESUMMARY_SEVERITY default: - return 0, errors.New("Unknown CodeScanningAlertRuleSummary_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_set_state.go b/pkg/github/models/code_scanning_alert_set_state.go index 8caa6ce0..b8a36cf3 100644 --- a/pkg/github/models/code_scanning_alert_set_state.go +++ b/pkg/github/models/code_scanning_alert_set_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. type CodeScanningAlertSetState int @@ -21,7 +18,7 @@ func ParseCodeScanningAlertSetState(v string) (any, error) { case "dismissed": result = DISMISSED_CODESCANNINGALERTSETSTATE default: - return 0, errors.New("Unknown CodeScanningAlertSetState value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_severity.go b/pkg/github/models/code_scanning_alert_severity.go index 7354b254..a2bbc71a 100644 --- a/pkg/github/models/code_scanning_alert_severity.go +++ b/pkg/github/models/code_scanning_alert_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Severity of a code scanning alert. type CodeScanningAlertSeverity int @@ -36,7 +33,7 @@ func ParseCodeScanningAlertSeverity(v string) (any, error) { case "error": result = ERROR_CODESCANNINGALERTSEVERITY default: - return 0, errors.New("Unknown CodeScanningAlertSeverity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_state.go b/pkg/github/models/code_scanning_alert_state.go index fd3ce894..91eb5c36 100644 --- a/pkg/github/models/code_scanning_alert_state.go +++ b/pkg/github/models/code_scanning_alert_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of a code scanning alert. type CodeScanningAlertState int @@ -24,7 +21,7 @@ func ParseCodeScanningAlertState(v string) (any, error) { case "fixed": result = FIXED_CODESCANNINGALERTSTATE default: - return 0, errors.New("Unknown CodeScanningAlertState value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_alert_state_query.go b/pkg/github/models/code_scanning_alert_state_query.go index c571d6c4..01cbc10d 100644 --- a/pkg/github/models/code_scanning_alert_state_query.go +++ b/pkg/github/models/code_scanning_alert_state_query.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of a code scanning alert. type CodeScanningAlertStateQuery int @@ -27,7 +24,7 @@ func ParseCodeScanningAlertStateQuery(v string) (any, error) { case "fixed": result = FIXED_CODESCANNINGALERTSTATEQUERY default: - return 0, errors.New("Unknown CodeScanningAlertStateQuery value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_languages.go b/pkg/github/models/code_scanning_default_setup_languages.go index e5bdd501..78b417f4 100644 --- a/pkg/github/models/code_scanning_default_setup_languages.go +++ b/pkg/github/models/code_scanning_default_setup_languages.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type CodeScanningDefaultSetup_languages int const ( @@ -44,7 +41,7 @@ func ParseCodeScanningDefaultSetup_languages(v string) (any, error) { case "swift": result = SWIFT_CODESCANNINGDEFAULTSETUP_LANGUAGES default: - return 0, errors.New("Unknown CodeScanningDefaultSetup_languages value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_query_suite.go b/pkg/github/models/code_scanning_default_setup_query_suite.go index ac529a4b..403fd560 100644 --- a/pkg/github/models/code_scanning_default_setup_query_suite.go +++ b/pkg/github/models/code_scanning_default_setup_query_suite.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // CodeQL query suite to be used. type CodeScanningDefaultSetup_query_suite int @@ -21,7 +18,7 @@ func ParseCodeScanningDefaultSetup_query_suite(v string) (any, error) { case "extended": result = EXTENDED_CODESCANNINGDEFAULTSETUP_QUERY_SUITE default: - return 0, errors.New("Unknown CodeScanningDefaultSetup_query_suite value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_schedule.go b/pkg/github/models/code_scanning_default_setup_schedule.go index 341dff8a..1a36aee7 100644 --- a/pkg/github/models/code_scanning_default_setup_schedule.go +++ b/pkg/github/models/code_scanning_default_setup_schedule.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The frequency of the periodic analysis. type CodeScanningDefaultSetup_schedule int @@ -18,7 +15,7 @@ func ParseCodeScanningDefaultSetup_schedule(v string) (any, error) { case "weekly": result = WEEKLY_CODESCANNINGDEFAULTSETUP_SCHEDULE default: - return 0, errors.New("Unknown CodeScanningDefaultSetup_schedule value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_state.go b/pkg/github/models/code_scanning_default_setup_state.go index 60ecd6e2..472c10d3 100644 --- a/pkg/github/models/code_scanning_default_setup_state.go +++ b/pkg/github/models/code_scanning_default_setup_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Code scanning default setup has been configured or not. type CodeScanningDefaultSetup_state int @@ -21,7 +18,7 @@ func ParseCodeScanningDefaultSetup_state(v string) (any, error) { case "not-configured": result = NOTCONFIGURED_CODESCANNINGDEFAULTSETUP_STATE default: - return 0, errors.New("Unknown CodeScanningDefaultSetup_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_update_languages.go b/pkg/github/models/code_scanning_default_setup_update_languages.go index 555d19c7..c1f3a1f8 100644 --- a/pkg/github/models/code_scanning_default_setup_update_languages.go +++ b/pkg/github/models/code_scanning_default_setup_update_languages.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type CodeScanningDefaultSetupUpdate_languages int const ( @@ -38,7 +35,7 @@ func ParseCodeScanningDefaultSetupUpdate_languages(v string) (any, error) { case "swift": result = SWIFT_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES default: - return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_languages value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_update_query_suite.go b/pkg/github/models/code_scanning_default_setup_update_query_suite.go index 3ec3c5e5..2761da92 100644 --- a/pkg/github/models/code_scanning_default_setup_update_query_suite.go +++ b/pkg/github/models/code_scanning_default_setup_update_query_suite.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // CodeQL query suite to be used. type CodeScanningDefaultSetupUpdate_query_suite int @@ -21,7 +18,7 @@ func ParseCodeScanningDefaultSetupUpdate_query_suite(v string) (any, error) { case "extended": result = EXTENDED_CODESCANNINGDEFAULTSETUPUPDATE_QUERY_SUITE default: - return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_query_suite value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_default_setup_update_state.go b/pkg/github/models/code_scanning_default_setup_update_state.go index 62a21fb4..1bcb0ae5 100644 --- a/pkg/github/models/code_scanning_default_setup_update_state.go +++ b/pkg/github/models/code_scanning_default_setup_update_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The desired state of code scanning default setup. type CodeScanningDefaultSetupUpdate_state int @@ -21,7 +18,7 @@ func ParseCodeScanningDefaultSetupUpdate_state(v string) (any, error) { case "not-configured": result = NOTCONFIGURED_CODESCANNINGDEFAULTSETUPUPDATE_STATE default: - return 0, errors.New("Unknown CodeScanningDefaultSetupUpdate_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_sarifs_status_processing_status.go b/pkg/github/models/code_scanning_sarifs_status_processing_status.go index 3f3814d1..915586bf 100644 --- a/pkg/github/models/code_scanning_sarifs_status_processing_status.go +++ b/pkg/github/models/code_scanning_sarifs_status_processing_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. type CodeScanningSarifsStatus_processing_status int @@ -24,7 +21,7 @@ func ParseCodeScanningSarifsStatus_processing_status(v string) (any, error) { case "failed": result = FAILED_CODESCANNINGSARIFSSTATUS_PROCESSING_STATUS default: - return 0, errors.New("Unknown CodeScanningSarifsStatus_processing_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/code_scanning_variant_analysis.go b/pkg/github/models/code_scanning_variant_analysis.go new file mode 100644 index 00000000..e2cd0247 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis.go @@ -0,0 +1,445 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysis a run of a CodeQL query against one or more repositories. +type CodeScanningVariantAnalysis struct { + // The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. + actions_workflow_run_id *int32 + // A GitHub user. + actor SimpleUserable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub repository. + controller_repo SimpleRepositoryable + // The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. + failure_reason *CodeScanningVariantAnalysis_failure_reason + // The ID of the variant analysis. + id *int32 + // The language targeted by the CodeQL query + query_language *CodeScanningVariantAnalysisLanguage + // The download url for the query pack. + query_pack_url *string + // The scanned_repositories property + scanned_repositories []CodeScanningVariantAnalysis_scanned_repositoriesable + // Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. + skipped_repositories CodeScanningVariantAnalysis_skipped_repositoriesable + // The status property + status *CodeScanningVariantAnalysisStatus + // The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCodeScanningVariantAnalysis instantiates a new CodeScanningVariantAnalysis and sets the default values. +func NewCodeScanningVariantAnalysis()(*CodeScanningVariantAnalysis) { + m := &CodeScanningVariantAnalysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis(), nil +} +// GetActionsWorkflowRunId gets the actions_workflow_run_id property value. The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis) GetActionsWorkflowRunId()(*int32) { + return m.actions_workflow_run_id +} +// GetActor gets the actor property value. A GitHub user. +// returns a SimpleUserable when successful +func (m *CodeScanningVariantAnalysis) GetActor()(SimpleUserable) { + return m.actor +} +// 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 *CodeScanningVariantAnalysis) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompletedAt gets the completed_at property value. The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetControllerRepo gets the controller_repo property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeScanningVariantAnalysis) GetControllerRepo()(SimpleRepositoryable) { + return m.controller_repo +} +// GetCreatedAt gets the created_at property value. The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFailureReason gets the failure_reason property value. The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +// returns a *CodeScanningVariantAnalysis_failure_reason when successful +func (m *CodeScanningVariantAnalysis) GetFailureReason()(*CodeScanningVariantAnalysis_failure_reason) { + return m.failure_reason +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions_workflow_run_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActionsWorkflowRunId(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(SimpleUserable)) + } + return nil + } + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["controller_repo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetControllerRepo(val.(SimpleRepositoryable)) + } + return nil + } + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["failure_reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysis_failure_reason) + if err != nil { + return err + } + if val != nil { + m.SetFailureReason(val.(*CodeScanningVariantAnalysis_failure_reason)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["query_language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisLanguage) + if err != nil { + return err + } + if val != nil { + m.SetQueryLanguage(val.(*CodeScanningVariantAnalysisLanguage)) + } + return nil + } + res["query_pack_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryPackUrl(val) + } + return nil + } + res["scanned_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningVariantAnalysis_scanned_repositoriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CodeScanningVariantAnalysis_scanned_repositoriesable) + } + } + m.SetScannedRepositories(res) + } + return nil + } + res["skipped_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSkippedRepositories(val.(CodeScanningVariantAnalysis_skipped_repositoriesable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the variant analysis. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis) GetId()(*int32) { + return m.id +} +// GetQueryLanguage gets the query_language property value. The language targeted by the CodeQL query +// returns a *CodeScanningVariantAnalysisLanguage when successful +func (m *CodeScanningVariantAnalysis) GetQueryLanguage()(*CodeScanningVariantAnalysisLanguage) { + return m.query_language +} +// GetQueryPackUrl gets the query_pack_url property value. The download url for the query pack. +// returns a *string when successful +func (m *CodeScanningVariantAnalysis) GetQueryPackUrl()(*string) { + return m.query_pack_url +} +// GetScannedRepositories gets the scanned_repositories property value. The scanned_repositories property +// returns a []CodeScanningVariantAnalysis_scanned_repositoriesable when successful +func (m *CodeScanningVariantAnalysis) GetScannedRepositories()([]CodeScanningVariantAnalysis_scanned_repositoriesable) { + return m.scanned_repositories +} +// GetSkippedRepositories gets the skipped_repositories property value. Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +// returns a CodeScanningVariantAnalysis_skipped_repositoriesable when successful +func (m *CodeScanningVariantAnalysis) GetSkippedRepositories()(CodeScanningVariantAnalysis_skipped_repositoriesable) { + return m.skipped_repositories +} +// GetStatus gets the status property value. The status property +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysis) GetStatus()(*CodeScanningVariantAnalysisStatus) { + return m.status +} +// GetUpdatedAt gets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +// returns a *Time when successful +func (m *CodeScanningVariantAnalysis) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actions_workflow_run_id", m.GetActionsWorkflowRunId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("controller_repo", m.GetControllerRepo()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + if m.GetFailureReason() != nil { + cast := (*m.GetFailureReason()).String() + err := writer.WriteStringValue("failure_reason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetQueryLanguage() != nil { + cast := (*m.GetQueryLanguage()).String() + err := writer.WriteStringValue("query_language", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("query_pack_url", m.GetQueryPackUrl()) + if err != nil { + return err + } + } + if m.GetScannedRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScannedRepositories())) + for i, v := range m.GetScannedRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("scanned_repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("skipped_repositories", m.GetSkippedRepositories()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionsWorkflowRunId sets the actions_workflow_run_id property value. The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. +func (m *CodeScanningVariantAnalysis) SetActionsWorkflowRunId(value *int32)() { + m.actions_workflow_run_id = value +} +// SetActor sets the actor property value. A GitHub user. +func (m *CodeScanningVariantAnalysis) SetActor(value SimpleUserable)() { + m.actor = 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 *CodeScanningVariantAnalysis) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompletedAt sets the completed_at property value. The date and time at which the variant analysis was completed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the variant analysis has not yet completed or this information is not available. +func (m *CodeScanningVariantAnalysis) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetControllerRepo sets the controller_repo property value. A GitHub repository. +func (m *CodeScanningVariantAnalysis) SetControllerRepo(value SimpleRepositoryable)() { + m.controller_repo = value +} +// SetCreatedAt sets the created_at property value. The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningVariantAnalysis) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetFailureReason sets the failure_reason property value. The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +func (m *CodeScanningVariantAnalysis) SetFailureReason(value *CodeScanningVariantAnalysis_failure_reason)() { + m.failure_reason = value +} +// SetId sets the id property value. The ID of the variant analysis. +func (m *CodeScanningVariantAnalysis) SetId(value *int32)() { + m.id = value +} +// SetQueryLanguage sets the query_language property value. The language targeted by the CodeQL query +func (m *CodeScanningVariantAnalysis) SetQueryLanguage(value *CodeScanningVariantAnalysisLanguage)() { + m.query_language = value +} +// SetQueryPackUrl sets the query_pack_url property value. The download url for the query pack. +func (m *CodeScanningVariantAnalysis) SetQueryPackUrl(value *string)() { + m.query_pack_url = value +} +// SetScannedRepositories sets the scanned_repositories property value. The scanned_repositories property +func (m *CodeScanningVariantAnalysis) SetScannedRepositories(value []CodeScanningVariantAnalysis_scanned_repositoriesable)() { + m.scanned_repositories = value +} +// SetSkippedRepositories sets the skipped_repositories property value. Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +func (m *CodeScanningVariantAnalysis) SetSkippedRepositories(value CodeScanningVariantAnalysis_skipped_repositoriesable)() { + m.skipped_repositories = value +} +// SetStatus sets the status property value. The status property +func (m *CodeScanningVariantAnalysis) SetStatus(value *CodeScanningVariantAnalysisStatus)() { + m.status = value +} +// SetUpdatedAt sets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. +func (m *CodeScanningVariantAnalysis) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CodeScanningVariantAnalysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionsWorkflowRunId()(*int32) + GetActor()(SimpleUserable) + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetControllerRepo()(SimpleRepositoryable) + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailureReason()(*CodeScanningVariantAnalysis_failure_reason) + GetId()(*int32) + GetQueryLanguage()(*CodeScanningVariantAnalysisLanguage) + GetQueryPackUrl()(*string) + GetScannedRepositories()([]CodeScanningVariantAnalysis_scanned_repositoriesable) + GetSkippedRepositories()(CodeScanningVariantAnalysis_skipped_repositoriesable) + GetStatus()(*CodeScanningVariantAnalysisStatus) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActionsWorkflowRunId(value *int32)() + SetActor(value SimpleUserable)() + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetControllerRepo(value SimpleRepositoryable)() + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailureReason(value *CodeScanningVariantAnalysis_failure_reason)() + SetId(value *int32)() + SetQueryLanguage(value *CodeScanningVariantAnalysisLanguage)() + SetQueryPackUrl(value *string)() + SetScannedRepositories(value []CodeScanningVariantAnalysis_scanned_repositoriesable)() + SetSkippedRepositories(value CodeScanningVariantAnalysis_skipped_repositoriesable)() + SetStatus(value *CodeScanningVariantAnalysisStatus)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis503_error.go b/pkg/github/models/code_scanning_variant_analysis503_error.go new file mode 100644 index 00000000..ba958c71 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningVariantAnalysis503Error instantiates a new CodeScanningVariantAnalysis503Error and sets the default values. +func NewCodeScanningVariantAnalysis503Error()(*CodeScanningVariantAnalysis503Error) { + m := &CodeScanningVariantAnalysis503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningVariantAnalysis503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningVariantAnalysis503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysis503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningVariantAnalysis503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningVariantAnalysis503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningVariantAnalysis503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningVariantAnalysis503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_failure_reason.go b/pkg/github/models/code_scanning_variant_analysis_failure_reason.go new file mode 100644 index 00000000..255c83bc --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_failure_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. +type CodeScanningVariantAnalysis_failure_reason int + +const ( + NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON CodeScanningVariantAnalysis_failure_reason = iota + ACTIONS_WORKFLOW_RUN_FAILED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + INTERNAL_ERROR_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON +) + +func (i CodeScanningVariantAnalysis_failure_reason) String() string { + return []string{"no_repos_queried", "actions_workflow_run_failed", "internal_error"}[i] +} +func ParseCodeScanningVariantAnalysis_failure_reason(v string) (any, error) { + result := NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + switch v { + case "no_repos_queried": + result = NO_REPOS_QUERIED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + case "actions_workflow_run_failed": + result = ACTIONS_WORKFLOW_RUN_FAILED_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + case "internal_error": + result = INTERNAL_ERROR_CODESCANNINGVARIANTANALYSIS_FAILURE_REASON + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysis_failure_reason value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysis_failure_reason(values []CodeScanningVariantAnalysis_failure_reason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysis_failure_reason) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_variant_analysis_language.go b/pkg/github/models/code_scanning_variant_analysis_language.go new file mode 100644 index 00000000..2e13b31f --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_language.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// The language targeted by the CodeQL query +type CodeScanningVariantAnalysisLanguage int + +const ( + CPP_CODESCANNINGVARIANTANALYSISLANGUAGE CodeScanningVariantAnalysisLanguage = iota + CSHARP_CODESCANNINGVARIANTANALYSISLANGUAGE + GO_CODESCANNINGVARIANTANALYSISLANGUAGE + JAVA_CODESCANNINGVARIANTANALYSISLANGUAGE + JAVASCRIPT_CODESCANNINGVARIANTANALYSISLANGUAGE + PYTHON_CODESCANNINGVARIANTANALYSISLANGUAGE + RUBY_CODESCANNINGVARIANTANALYSISLANGUAGE + SWIFT_CODESCANNINGVARIANTANALYSISLANGUAGE +) + +func (i CodeScanningVariantAnalysisLanguage) String() string { + return []string{"cpp", "csharp", "go", "java", "javascript", "python", "ruby", "swift"}[i] +} +func ParseCodeScanningVariantAnalysisLanguage(v string) (any, error) { + result := CPP_CODESCANNINGVARIANTANALYSISLANGUAGE + switch v { + case "cpp": + result = CPP_CODESCANNINGVARIANTANALYSISLANGUAGE + case "csharp": + result = CSHARP_CODESCANNINGVARIANTANALYSISLANGUAGE + case "go": + result = GO_CODESCANNINGVARIANTANALYSISLANGUAGE + case "java": + result = JAVA_CODESCANNINGVARIANTANALYSISLANGUAGE + case "javascript": + result = JAVASCRIPT_CODESCANNINGVARIANTANALYSISLANGUAGE + case "python": + result = PYTHON_CODESCANNINGVARIANTANALYSISLANGUAGE + case "ruby": + result = RUBY_CODESCANNINGVARIANTANALYSISLANGUAGE + case "swift": + result = SWIFT_CODESCANNINGVARIANTANALYSISLANGUAGE + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysisLanguage value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysisLanguage(values []CodeScanningVariantAnalysisLanguage) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysisLanguage) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repo_task.go b/pkg/github/models/code_scanning_variant_analysis_repo_task.go new file mode 100644 index 00000000..8f74628a --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repo_task.go @@ -0,0 +1,284 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisRepoTask 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 new status of the CodeQL variant analysis repository task. + analysis_status *CodeScanningVariantAnalysisStatus + // The size of the artifact. This is only available for successful analyses. + artifact_size_in_bytes *int32 + // The URL of the artifact. This is only available for successful analyses. + artifact_url *string + // The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. + database_commit_sha *string + // The reason of the failure of this repo task. This is only available if the repository task has failed. + failure_message *string + // A GitHub repository. + repository SimpleRepositoryable + // The number of results in the case of a successful analysis. This is only available for successful analyses. + result_count *int32 + // The source location prefix to use. This is only available for successful analyses. + source_location_prefix *string +} +// NewCodeScanningVariantAnalysisRepoTask instantiates a new CodeScanningVariantAnalysisRepoTask and sets the default values. +func NewCodeScanningVariantAnalysisRepoTask()(*CodeScanningVariantAnalysisRepoTask) { + m := &CodeScanningVariantAnalysisRepoTask{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepoTask(), 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 *CodeScanningVariantAnalysisRepoTask) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisStatus gets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) { + return m.analysis_status +} +// GetArtifactSizeInBytes gets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetArtifactSizeInBytes()(*int32) { + return m.artifact_size_in_bytes +} +// GetArtifactUrl gets the artifact_url property value. The URL of the artifact. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetArtifactUrl()(*string) { + return m.artifact_url +} +// GetDatabaseCommitSha gets the database_commit_sha property value. The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetDatabaseCommitSha()(*string) { + return m.database_commit_sha +} +// GetFailureMessage gets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetFailureMessage()(*string) { + return m.failure_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetAnalysisStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["artifact_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetArtifactSizeInBytes(val) + } + return nil + } + res["artifact_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArtifactUrl(val) + } + return nil + } + res["database_commit_sha"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDatabaseCommitSha(val) + } + return nil + } + res["failure_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureMessage(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSimpleRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(SimpleRepositoryable)) + } + return nil + } + res["result_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val) + } + return nil + } + res["source_location_prefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceLocationPrefix(val) + } + return nil + } + return res +} +// GetRepository gets the repository property value. A GitHub repository. +// returns a SimpleRepositoryable when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetRepository()(SimpleRepositoryable) { + return m.repository +} +// GetResultCount gets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetResultCount()(*int32) { + return m.result_count +} +// GetSourceLocationPrefix gets the source_location_prefix property value. The source location prefix to use. This is only available for successful analyses. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask) GetSourceLocationPrefix()(*string) { + return m.source_location_prefix +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepoTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAnalysisStatus() != nil { + cast := (*m.GetAnalysisStatus()).String() + err := writer.WriteStringValue("analysis_status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("artifact_size_in_bytes", m.GetArtifactSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("artifact_url", m.GetArtifactUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("database_commit_sha", m.GetDatabaseCommitSha()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failure_message", m.GetFailureMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("result_count", m.GetResultCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source_location_prefix", m.GetSourceLocationPrefix()) + 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 *CodeScanningVariantAnalysisRepoTask) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisStatus sets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +func (m *CodeScanningVariantAnalysisRepoTask) SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() { + m.analysis_status = value +} +// SetArtifactSizeInBytes sets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetArtifactSizeInBytes(value *int32)() { + m.artifact_size_in_bytes = value +} +// SetArtifactUrl sets the artifact_url property value. The URL of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetArtifactUrl(value *string)() { + m.artifact_url = value +} +// SetDatabaseCommitSha sets the database_commit_sha property value. The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetDatabaseCommitSha(value *string)() { + m.database_commit_sha = value +} +// SetFailureMessage sets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +func (m *CodeScanningVariantAnalysisRepoTask) SetFailureMessage(value *string)() { + m.failure_message = value +} +// SetRepository sets the repository property value. A GitHub repository. +func (m *CodeScanningVariantAnalysisRepoTask) SetRepository(value SimpleRepositoryable)() { + m.repository = value +} +// SetResultCount sets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetResultCount(value *int32)() { + m.result_count = value +} +// SetSourceLocationPrefix sets the source_location_prefix property value. The source location prefix to use. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysisRepoTask) SetSourceLocationPrefix(value *string)() { + m.source_location_prefix = value +} +type CodeScanningVariantAnalysisRepoTaskable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) + GetArtifactSizeInBytes()(*int32) + GetArtifactUrl()(*string) + GetDatabaseCommitSha()(*string) + GetFailureMessage()(*string) + GetRepository()(SimpleRepositoryable) + GetResultCount()(*int32) + GetSourceLocationPrefix()(*string) + SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() + SetArtifactSizeInBytes(value *int32)() + SetArtifactUrl(value *string)() + SetDatabaseCommitSha(value *string)() + SetFailureMessage(value *string)() + SetRepository(value SimpleRepositoryable)() + SetResultCount(value *int32)() + SetSourceLocationPrefix(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go b/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go new file mode 100644 index 00000000..e6f929fa --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repo_task503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisRepoTask503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewCodeScanningVariantAnalysisRepoTask503Error instantiates a new CodeScanningVariantAnalysisRepoTask503Error and sets the default values. +func NewCodeScanningVariantAnalysisRepoTask503Error()(*CodeScanningVariantAnalysisRepoTask503Error) { + m := &CodeScanningVariantAnalysisRepoTask503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepoTask503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepoTask503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepoTask503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *CodeScanningVariantAnalysisRepoTask503Error) SetMessage(value *string)() { + m.message = value +} +type CodeScanningVariantAnalysisRepoTask503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_repository.go b/pkg/github/models/code_scanning_variant_analysis_repository.go new file mode 100644 index 00000000..ecf693bf --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_repository.go @@ -0,0 +1,227 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysisRepository repository Identifier +type CodeScanningVariantAnalysisRepository 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, globally unique, name of the repository. + full_name *string + // A unique identifier of the repository. + id *int32 + // The name of the repository. + name *string + // Whether the repository is private. + private *bool + // The stargazers_count property + stargazers_count *int32 + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCodeScanningVariantAnalysisRepository instantiates a new CodeScanningVariantAnalysisRepository and sets the default values. +func NewCodeScanningVariantAnalysisRepository()(*CodeScanningVariantAnalysisRepository) { + m := &CodeScanningVariantAnalysisRepository{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisRepository(), 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 *CodeScanningVariantAnalysisRepository) 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 *CodeScanningVariantAnalysisRepository) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["full_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["private"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivate(val) + } + return nil + } + res["stargazers_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStargazersCount(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + return res +} +// GetFullName gets the full_name property value. The full, globally unique, name of the repository. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepository) GetFullName()(*string) { + return m.full_name +} +// GetId gets the id property value. A unique identifier of the repository. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepository) GetId()(*int32) { + return m.id +} +// GetName gets the name property value. The name of the repository. +// returns a *string when successful +func (m *CodeScanningVariantAnalysisRepository) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Whether the repository is private. +// returns a *bool when successful +func (m *CodeScanningVariantAnalysisRepository) GetPrivate()(*bool) { + return m.private +} +// GetStargazersCount gets the stargazers_count property value. The stargazers_count property +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisRepository) GetStargazersCount()(*int32) { + return m.stargazers_count +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *CodeScanningVariantAnalysisRepository) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisRepository) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("full_name", m.GetFullName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("private", m.GetPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("stargazers_count", m.GetStargazersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + 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 *CodeScanningVariantAnalysisRepository) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetFullName sets the full_name property value. The full, globally unique, name of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetFullName(value *string)() { + m.full_name = value +} +// SetId sets the id property value. A unique identifier of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetId(value *int32)() { + m.id = value +} +// SetName sets the name property value. The name of the repository. +func (m *CodeScanningVariantAnalysisRepository) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Whether the repository is private. +func (m *CodeScanningVariantAnalysisRepository) SetPrivate(value *bool)() { + m.private = value +} +// SetStargazersCount sets the stargazers_count property value. The stargazers_count property +func (m *CodeScanningVariantAnalysisRepository) SetStargazersCount(value *int32)() { + m.stargazers_count = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *CodeScanningVariantAnalysisRepository) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +type CodeScanningVariantAnalysisRepositoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFullName()(*string) + GetId()(*int32) + GetName()(*string) + GetPrivate()(*bool) + GetStargazersCount()(*int32) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetFullName(value *string)() + SetId(value *int32)() + SetName(value *string)() + SetPrivate(value *bool)() + SetStargazersCount(value *int32)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go b/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go new file mode 100644 index 00000000..f860e45a --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_scanned_repositories.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis_scanned_repositories struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The new status of the CodeQL variant analysis repository task. + analysis_status *CodeScanningVariantAnalysisStatus + // The size of the artifact. This is only available for successful analyses. + artifact_size_in_bytes *int32 + // The reason of the failure of this repo task. This is only available if the repository task has failed. + failure_message *string + // Repository Identifier + repository CodeScanningVariantAnalysisRepositoryable + // The number of results in the case of a successful analysis. This is only available for successful analyses. + result_count *int32 +} +// NewCodeScanningVariantAnalysis_scanned_repositories instantiates a new CodeScanningVariantAnalysis_scanned_repositories and sets the default values. +func NewCodeScanningVariantAnalysis_scanned_repositories()(*CodeScanningVariantAnalysis_scanned_repositories) { + m := &CodeScanningVariantAnalysis_scanned_repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_scanned_repositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_scanned_repositories(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAnalysisStatus gets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +// returns a *CodeScanningVariantAnalysisStatus when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) { + return m.analysis_status +} +// GetArtifactSizeInBytes gets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetArtifactSizeInBytes()(*int32) { + return m.artifact_size_in_bytes +} +// GetFailureMessage gets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +// returns a *string when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetFailureMessage()(*string) { + return m.failure_message +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["analysis_status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus) + if err != nil { + return err + } + if val != nil { + m.SetAnalysisStatus(val.(*CodeScanningVariantAnalysisStatus)) + } + return nil + } + res["artifact_size_in_bytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetArtifactSizeInBytes(val) + } + return nil + } + res["failure_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureMessage(val) + } + return nil + } + res["repository"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRepository(val.(CodeScanningVariantAnalysisRepositoryable)) + } + return nil + } + res["result_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResultCount(val) + } + return nil + } + return res +} +// GetRepository gets the repository property value. Repository Identifier +// returns a CodeScanningVariantAnalysisRepositoryable when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetRepository()(CodeScanningVariantAnalysisRepositoryable) { + return m.repository +} +// GetResultCount gets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_scanned_repositories) GetResultCount()(*int32) { + return m.result_count +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_scanned_repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAnalysisStatus() != nil { + cast := (*m.GetAnalysisStatus()).String() + err := writer.WriteStringValue("analysis_status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("artifact_size_in_bytes", m.GetArtifactSizeInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failure_message", m.GetFailureMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("repository", m.GetRepository()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("result_count", m.GetResultCount()) + 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 *CodeScanningVariantAnalysis_scanned_repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAnalysisStatus sets the analysis_status property value. The new status of the CodeQL variant analysis repository task. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() { + m.analysis_status = value +} +// SetArtifactSizeInBytes sets the artifact_size_in_bytes property value. The size of the artifact. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetArtifactSizeInBytes(value *int32)() { + m.artifact_size_in_bytes = value +} +// SetFailureMessage sets the failure_message property value. The reason of the failure of this repo task. This is only available if the repository task has failed. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetFailureMessage(value *string)() { + m.failure_message = value +} +// SetRepository sets the repository property value. Repository Identifier +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetRepository(value CodeScanningVariantAnalysisRepositoryable)() { + m.repository = value +} +// SetResultCount sets the result_count property value. The number of results in the case of a successful analysis. This is only available for successful analyses. +func (m *CodeScanningVariantAnalysis_scanned_repositories) SetResultCount(value *int32)() { + m.result_count = value +} +type CodeScanningVariantAnalysis_scanned_repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalysisStatus()(*CodeScanningVariantAnalysisStatus) + GetArtifactSizeInBytes()(*int32) + GetFailureMessage()(*string) + GetRepository()(CodeScanningVariantAnalysisRepositoryable) + GetResultCount()(*int32) + SetAnalysisStatus(value *CodeScanningVariantAnalysisStatus)() + SetArtifactSizeInBytes(value *int32)() + SetFailureMessage(value *string)() + SetRepository(value CodeScanningVariantAnalysisRepositoryable)() + SetResultCount(value *int32)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go new file mode 100644 index 00000000..536ec482 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repo_group.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysisSkippedRepoGroup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. + repositories []CodeScanningVariantAnalysisRepositoryable + // The total number of repositories that were skipped for this reason. + repository_count *int32 +} +// NewCodeScanningVariantAnalysisSkippedRepoGroup instantiates a new CodeScanningVariantAnalysisSkippedRepoGroup and sets the default values. +func NewCodeScanningVariantAnalysisSkippedRepoGroup()(*CodeScanningVariantAnalysisSkippedRepoGroup) { + m := &CodeScanningVariantAnalysisSkippedRepoGroup{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysisSkippedRepoGroup(), 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 *CodeScanningVariantAnalysisSkippedRepoGroup) 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 *CodeScanningVariantAnalysisSkippedRepoGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCodeScanningVariantAnalysisRepositoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CodeScanningVariantAnalysisRepositoryable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CodeScanningVariantAnalysisRepositoryable) + } + } + m.SetRepositories(res) + } + return nil + } + res["repository_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCount(val) + } + return nil + } + return res +} +// GetRepositories gets the repositories property value. A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. +// returns a []CodeScanningVariantAnalysisRepositoryable when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetRepositories()([]CodeScanningVariantAnalysisRepositoryable) { + return m.repositories +} +// GetRepositoryCount gets the repository_count property value. The total number of repositories that were skipped for this reason. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) GetRepositoryCount()(*int32) { + return m.repository_count +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRepositories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRepositories())) + for i, v := range m.GetRepositories() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("repositories", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_count", m.GetRepositoryCount()) + 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 *CodeScanningVariantAnalysisSkippedRepoGroup) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositories sets the repositories property value. A list of repositories that were skipped. This list may not include all repositories that were skipped. This is only available when the repository was found and the user has access to it. +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) SetRepositories(value []CodeScanningVariantAnalysisRepositoryable)() { + m.repositories = value +} +// SetRepositoryCount sets the repository_count property value. The total number of repositories that were skipped for this reason. +func (m *CodeScanningVariantAnalysisSkippedRepoGroup) SetRepositoryCount(value *int32)() { + m.repository_count = value +} +type CodeScanningVariantAnalysisSkippedRepoGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositories()([]CodeScanningVariantAnalysisRepositoryable) + GetRepositoryCount()(*int32) + SetRepositories(value []CodeScanningVariantAnalysisRepositoryable)() + SetRepositoryCount(value *int32)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go new file mode 100644 index 00000000..2336c1f0 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningVariantAnalysis_skipped_repositories information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +type CodeScanningVariantAnalysis_skipped_repositories struct { + // The access_mismatch_repos property + access_mismatch_repos CodeScanningVariantAnalysisSkippedRepoGroupable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The no_codeql_db_repos property + no_codeql_db_repos CodeScanningVariantAnalysisSkippedRepoGroupable + // The not_found_repos property + not_found_repos CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable + // The over_limit_repos property + over_limit_repos CodeScanningVariantAnalysisSkippedRepoGroupable +} +// NewCodeScanningVariantAnalysis_skipped_repositories instantiates a new CodeScanningVariantAnalysis_skipped_repositories and sets the default values. +func NewCodeScanningVariantAnalysis_skipped_repositories()(*CodeScanningVariantAnalysis_skipped_repositories) { + m := &CodeScanningVariantAnalysis_skipped_repositories{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_skipped_repositoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_skipped_repositories(), nil +} +// GetAccessMismatchRepos gets the access_mismatch_repos property value. The access_mismatch_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetAccessMismatchRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.access_mismatch_repos +} +// 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 *CodeScanningVariantAnalysis_skipped_repositories) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access_mismatch_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessMismatchRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + res["no_codeql_db_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNoCodeqlDbRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + res["not_found_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotFoundRepos(val.(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)) + } + return nil + } + res["over_limit_repos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeScanningVariantAnalysisSkippedRepoGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOverLimitRepos(val.(CodeScanningVariantAnalysisSkippedRepoGroupable)) + } + return nil + } + return res +} +// GetNoCodeqlDbRepos gets the no_codeql_db_repos property value. The no_codeql_db_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetNoCodeqlDbRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.no_codeql_db_repos +} +// GetNotFoundRepos gets the not_found_repos property value. The not_found_repos property +// returns a CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetNotFoundRepos()(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable) { + return m.not_found_repos +} +// GetOverLimitRepos gets the over_limit_repos property value. The over_limit_repos property +// returns a CodeScanningVariantAnalysisSkippedRepoGroupable when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories) GetOverLimitRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) { + return m.over_limit_repos +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_skipped_repositories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("access_mismatch_repos", m.GetAccessMismatchRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("not_found_repos", m.GetNotFoundRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("no_codeql_db_repos", m.GetNoCodeqlDbRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("over_limit_repos", m.GetOverLimitRepos()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessMismatchRepos sets the access_mismatch_repos property value. The access_mismatch_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetAccessMismatchRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.access_mismatch_repos = 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 *CodeScanningVariantAnalysis_skipped_repositories) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNoCodeqlDbRepos sets the no_codeql_db_repos property value. The no_codeql_db_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetNoCodeqlDbRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.no_codeql_db_repos = value +} +// SetNotFoundRepos sets the not_found_repos property value. The not_found_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetNotFoundRepos(value CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)() { + m.not_found_repos = value +} +// SetOverLimitRepos sets the over_limit_repos property value. The over_limit_repos property +func (m *CodeScanningVariantAnalysis_skipped_repositories) SetOverLimitRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() { + m.over_limit_repos = value +} +type CodeScanningVariantAnalysis_skipped_repositoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessMismatchRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + GetNoCodeqlDbRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + GetNotFoundRepos()(CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable) + GetOverLimitRepos()(CodeScanningVariantAnalysisSkippedRepoGroupable) + SetAccessMismatchRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() + SetNoCodeqlDbRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() + SetNotFoundRepos(value CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable)() + SetOverLimitRepos(value CodeScanningVariantAnalysisSkippedRepoGroupable)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go new file mode 100644 index 00000000..64ef7061 --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_skipped_repositories_not_found_repos.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CodeScanningVariantAnalysis_skipped_repositories_not_found_repos 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 total number of repositories that were skipped for this reason. + repository_count *int32 + // A list of full repository names that were skipped. This list may not include all repositories that were skipped. + repository_full_names []string +} +// NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos instantiates a new CodeScanningVariantAnalysis_skipped_repositories_not_found_repos and sets the default values. +func NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos()(*CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) { + m := &CodeScanningVariantAnalysis_skipped_repositories_not_found_repos{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningVariantAnalysis_skipped_repositories_not_found_reposFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningVariantAnalysis_skipped_repositories_not_found_repos(), 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 *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) 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 *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["repository_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCount(val) + } + return nil + } + res["repository_full_names"] = 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.SetRepositoryFullNames(res) + } + return nil + } + return res +} +// GetRepositoryCount gets the repository_count property value. The total number of repositories that were skipped for this reason. +// returns a *int32 when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetRepositoryCount()(*int32) { + return m.repository_count +} +// GetRepositoryFullNames gets the repository_full_names property value. A list of full repository names that were skipped. This list may not include all repositories that were skipped. +// returns a []string when successful +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) GetRepositoryFullNames()([]string) { + return m.repository_full_names +} +// Serialize serializes information the current object +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("repository_count", m.GetRepositoryCount()) + if err != nil { + return err + } + } + if m.GetRepositoryFullNames() != nil { + err := writer.WriteCollectionOfStringValues("repository_full_names", m.GetRepositoryFullNames()) + 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 *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRepositoryCount sets the repository_count property value. The total number of repositories that were skipped for this reason. +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetRepositoryCount(value *int32)() { + m.repository_count = value +} +// SetRepositoryFullNames sets the repository_full_names property value. A list of full repository names that were skipped. This list may not include all repositories that were skipped. +func (m *CodeScanningVariantAnalysis_skipped_repositories_not_found_repos) SetRepositoryFullNames(value []string)() { + m.repository_full_names = value +} +type CodeScanningVariantAnalysis_skipped_repositories_not_found_reposable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRepositoryCount()(*int32) + GetRepositoryFullNames()([]string) + SetRepositoryCount(value *int32)() + SetRepositoryFullNames(value []string)() +} diff --git a/pkg/github/models/code_scanning_variant_analysis_status.go b/pkg/github/models/code_scanning_variant_analysis_status.go new file mode 100644 index 00000000..48d116ca --- /dev/null +++ b/pkg/github/models/code_scanning_variant_analysis_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// The new status of the CodeQL variant analysis repository task. +type CodeScanningVariantAnalysisStatus int + +const ( + PENDING_CODESCANNINGVARIANTANALYSISSTATUS CodeScanningVariantAnalysisStatus = iota + IN_PROGRESS_CODESCANNINGVARIANTANALYSISSTATUS + SUCCEEDED_CODESCANNINGVARIANTANALYSISSTATUS + FAILED_CODESCANNINGVARIANTANALYSISSTATUS + CANCELED_CODESCANNINGVARIANTANALYSISSTATUS + TIMED_OUT_CODESCANNINGVARIANTANALYSISSTATUS +) + +func (i CodeScanningVariantAnalysisStatus) String() string { + return []string{"pending", "in_progress", "succeeded", "failed", "canceled", "timed_out"}[i] +} +func ParseCodeScanningVariantAnalysisStatus(v string) (any, error) { + result := PENDING_CODESCANNINGVARIANTANALYSISSTATUS + switch v { + case "pending": + result = PENDING_CODESCANNINGVARIANTANALYSISSTATUS + case "in_progress": + result = IN_PROGRESS_CODESCANNINGVARIANTANALYSISSTATUS + case "succeeded": + result = SUCCEEDED_CODESCANNINGVARIANTANALYSISSTATUS + case "failed": + result = FAILED_CODESCANNINGVARIANTANALYSISSTATUS + case "canceled": + result = CANCELED_CODESCANNINGVARIANTANALYSISSTATUS + case "timed_out": + result = TIMED_OUT_CODESCANNINGVARIANTANALYSISSTATUS + default: + return 0, errors.New("Unknown CodeScanningVariantAnalysisStatus value: " + v) + } + return &result, nil +} +func SerializeCodeScanningVariantAnalysisStatus(values []CodeScanningVariantAnalysisStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningVariantAnalysisStatus) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/codespace_location.go b/pkg/github/models/codespace_location.go index c1cb0f66..7158222c 100644 --- a/pkg/github/models/codespace_location.go +++ b/pkg/github/models/codespace_location.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The initally assigned location of a new codespace. type Codespace_location int @@ -27,7 +24,7 @@ func ParseCodespace_location(v string) (any, error) { case "WestUs2": result = WESTUS2_CODESPACE_LOCATION default: - return 0, errors.New("Unknown Codespace_location value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespace_machine_prebuild_availability.go b/pkg/github/models/codespace_machine_prebuild_availability.go index a32badf1..13839b9e 100644 --- a/pkg/github/models/codespace_machine_prebuild_availability.go +++ b/pkg/github/models/codespace_machine_prebuild_availability.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. type CodespaceMachine_prebuild_availability int @@ -24,7 +21,7 @@ func ParseCodespaceMachine_prebuild_availability(v string) (any, error) { case "in_progress": result = IN_PROGRESS_CODESPACEMACHINE_PREBUILD_AVAILABILITY default: - return 0, errors.New("Unknown CodespaceMachine_prebuild_availability value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespace_state.go b/pkg/github/models/codespace_state.go index c4633950..921c0ef1 100644 --- a/pkg/github/models/codespace_state.go +++ b/pkg/github/models/codespace_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of this codespace. type Codespace_state int @@ -66,7 +63,7 @@ func ParseCodespace_state(v string) (any, error) { case "Rebuilding": result = REBUILDING_CODESPACE_STATE default: - return 0, errors.New("Unknown Codespace_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespace_with_full_repository_location.go b/pkg/github/models/codespace_with_full_repository_location.go index b972709e..d65d494a 100644 --- a/pkg/github/models/codespace_with_full_repository_location.go +++ b/pkg/github/models/codespace_with_full_repository_location.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The initally assigned location of a new codespace. type CodespaceWithFullRepository_location int @@ -27,7 +24,7 @@ func ParseCodespaceWithFullRepository_location(v string) (any, error) { case "WestUs2": result = WESTUS2_CODESPACEWITHFULLREPOSITORY_LOCATION default: - return 0, errors.New("Unknown CodespaceWithFullRepository_location value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespace_with_full_repository_state.go b/pkg/github/models/codespace_with_full_repository_state.go index d8cb98bc..3b42791e 100644 --- a/pkg/github/models/codespace_with_full_repository_state.go +++ b/pkg/github/models/codespace_with_full_repository_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of this codespace. type CodespaceWithFullRepository_state int @@ -66,7 +63,7 @@ func ParseCodespaceWithFullRepository_state(v string) (any, error) { case "Rebuilding": result = REBUILDING_CODESPACEWITHFULLREPOSITORY_STATE default: - return 0, errors.New("Unknown CodespaceWithFullRepository_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespaces_org_secret_visibility.go b/pkg/github/models/codespaces_org_secret_visibility.go index d0769f22..a2a2f80f 100644 --- a/pkg/github/models/codespaces_org_secret_visibility.go +++ b/pkg/github/models/codespaces_org_secret_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of repositories in the organization that the secret is visible to type CodespacesOrgSecret_visibility int @@ -24,7 +21,7 @@ func ParseCodespacesOrgSecret_visibility(v string) (any, error) { case "selected": result = SELECTED_CODESPACESORGSECRET_VISIBILITY default: - return 0, errors.New("Unknown CodespacesOrgSecret_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/codespaces_secret_visibility.go b/pkg/github/models/codespaces_secret_visibility.go index 8d3552ab..19ae3a01 100644 --- a/pkg/github/models/codespaces_secret_visibility.go +++ b/pkg/github/models/codespaces_secret_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of repositories in the organization that the secret is visible to type CodespacesSecret_visibility int @@ -24,7 +21,7 @@ func ParseCodespacesSecret_visibility(v string) (any, error) { case "selected": result = SELECTED_CODESPACESSECRET_VISIBILITY default: - return 0, errors.New("Unknown CodespacesSecret_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/commit_comparison_status.go b/pkg/github/models/commit_comparison_status.go index e67c8e0c..8ad1a139 100644 --- a/pkg/github/models/commit_comparison_status.go +++ b/pkg/github/models/commit_comparison_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type CommitComparison_status int const ( @@ -26,7 +23,7 @@ func ParseCommitComparison_status(v string) (any, error) { case "identical": result = IDENTICAL_COMMITCOMPARISON_STATUS default: - return 0, errors.New("Unknown CommitComparison_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/content_file_type.go b/pkg/github/models/content_file_type.go index 2d066918..929c9ba7 100644 --- a/pkg/github/models/content_file_type.go +++ b/pkg/github/models/content_file_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type ContentFile_type int const ( @@ -17,7 +14,7 @@ func ParseContentFile_type(v string) (any, error) { case "file": result = FILE_CONTENTFILE_TYPE default: - return 0, errors.New("Unknown ContentFile_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/content_submodule_type.go b/pkg/github/models/content_submodule_type.go index 9e8ce3c3..bbd3be3f 100644 --- a/pkg/github/models/content_submodule_type.go +++ b/pkg/github/models/content_submodule_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type ContentSubmodule_type int const ( @@ -17,7 +14,7 @@ func ParseContentSubmodule_type(v string) (any, error) { case "submodule": result = SUBMODULE_CONTENTSUBMODULE_TYPE default: - return 0, errors.New("Unknown ContentSubmodule_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/content_symlink_type.go b/pkg/github/models/content_symlink_type.go index 48973b3e..b1385a6b 100644 --- a/pkg/github/models/content_symlink_type.go +++ b/pkg/github/models/content_symlink_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type ContentSymlink_type int const ( @@ -17,7 +14,7 @@ func ParseContentSymlink_type(v string) (any, error) { case "symlink": result = SYMLINK_CONTENTSYMLINK_TYPE default: - return 0, errors.New("Unknown ContentSymlink_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/copilot_organization_details_cli.go b/pkg/github/models/copilot_organization_details_cli.go index af8a63c4..60e0eebd 100644 --- a/pkg/github/models/copilot_organization_details_cli.go +++ b/pkg/github/models/copilot_organization_details_cli.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The organization policy for allowing or disallowing organization members to use Copilot within their CLI. type CopilotOrganizationDetails_cli int @@ -24,7 +21,7 @@ func ParseCopilotOrganizationDetails_cli(v string) (any, error) { case "unconfigured": result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_CLI default: - return 0, errors.New("Unknown CopilotOrganizationDetails_cli value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/copilot_organization_details_ide_chat.go b/pkg/github/models/copilot_organization_details_ide_chat.go index a89ad2fc..6f551c3f 100644 --- a/pkg/github/models/copilot_organization_details_ide_chat.go +++ b/pkg/github/models/copilot_organization_details_ide_chat.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. type CopilotOrganizationDetails_ide_chat int @@ -24,7 +21,7 @@ func ParseCopilotOrganizationDetails_ide_chat(v string) (any, error) { case "unconfigured": result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_IDE_CHAT default: - return 0, errors.New("Unknown CopilotOrganizationDetails_ide_chat value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/copilot_organization_details_platform_chat.go b/pkg/github/models/copilot_organization_details_platform_chat.go index d03a09e5..cd15f1d8 100644 --- a/pkg/github/models/copilot_organization_details_platform_chat.go +++ b/pkg/github/models/copilot_organization_details_platform_chat.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The organization policy for allowing or disallowing organization members to use Copilot features within github.com. type CopilotOrganizationDetails_platform_chat int @@ -24,7 +21,7 @@ func ParseCopilotOrganizationDetails_platform_chat(v string) (any, error) { case "unconfigured": result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PLATFORM_CHAT default: - return 0, errors.New("Unknown CopilotOrganizationDetails_platform_chat value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/copilot_organization_details_public_code_suggestions.go b/pkg/github/models/copilot_organization_details_public_code_suggestions.go index 6fe57dba..5f49303c 100644 --- a/pkg/github/models/copilot_organization_details_public_code_suggestions.go +++ b/pkg/github/models/copilot_organization_details_public_code_suggestions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The organization policy for allowing or disallowing Copilot to make suggestions that match public code. type CopilotOrganizationDetails_public_code_suggestions int @@ -27,7 +24,7 @@ func ParseCopilotOrganizationDetails_public_code_suggestions(v string) (any, err case "unknown": result = UNKNOWN_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS default: - return 0, errors.New("Unknown CopilotOrganizationDetails_public_code_suggestions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/copilot_organization_details_seat_management_setting.go b/pkg/github/models/copilot_organization_details_seat_management_setting.go index b4b64ef4..de35283b 100644 --- a/pkg/github/models/copilot_organization_details_seat_management_setting.go +++ b/pkg/github/models/copilot_organization_details_seat_management_setting.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The mode of assigning new seats. type CopilotOrganizationDetails_seat_management_setting int @@ -27,7 +24,7 @@ func ParseCopilotOrganizationDetails_seat_management_setting(v string) (any, err case "unconfigured": result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_SEAT_MANAGEMENT_SETTING default: - return 0, errors.New("Unknown CopilotOrganizationDetails_seat_management_setting value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_dependency_scope.go b/pkg/github/models/dependabot_alert_dependency_scope.go index 4daff2e1..3d1d843e 100644 --- a/pkg/github/models/dependabot_alert_dependency_scope.go +++ b/pkg/github/models/dependabot_alert_dependency_scope.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The execution scope of the vulnerable dependency. type DependabotAlert_dependency_scope int @@ -21,7 +18,7 @@ func ParseDependabotAlert_dependency_scope(v string) (any, error) { case "runtime": result = RUNTIME_DEPENDABOTALERT_DEPENDENCY_SCOPE default: - return 0, errors.New("Unknown DependabotAlert_dependency_scope value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_dismissed_reason.go b/pkg/github/models/dependabot_alert_dismissed_reason.go index 6226c653..51ac021b 100644 --- a/pkg/github/models/dependabot_alert_dismissed_reason.go +++ b/pkg/github/models/dependabot_alert_dismissed_reason.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The reason that the alert was dismissed. type DependabotAlert_dismissed_reason int @@ -30,7 +27,7 @@ func ParseDependabotAlert_dismissed_reason(v string) (any, error) { case "tolerable_risk": result = TOLERABLE_RISK_DEPENDABOTALERT_DISMISSED_REASON default: - return 0, errors.New("Unknown DependabotAlert_dismissed_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go b/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go index dad68d1c..26a321bf 100644 --- a/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go +++ b/pkg/github/models/dependabot_alert_security_advisory_identifiers_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of advisory identifier. type DependabotAlertSecurityAdvisory_identifiers_type int @@ -21,7 +18,7 @@ func ParseDependabotAlertSecurityAdvisory_identifiers_type(v string) (any, error case "GHSA": result = GHSA_DEPENDABOTALERTSECURITYADVISORY_IDENTIFIERS_TYPE default: - return 0, errors.New("Unknown DependabotAlertSecurityAdvisory_identifiers_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_security_advisory_severity.go b/pkg/github/models/dependabot_alert_security_advisory_severity.go index 8de14c8f..4be82d6a 100644 --- a/pkg/github/models/dependabot_alert_security_advisory_severity.go +++ b/pkg/github/models/dependabot_alert_security_advisory_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. type DependabotAlertSecurityAdvisory_severity int @@ -27,7 +24,7 @@ func ParseDependabotAlertSecurityAdvisory_severity(v string) (any, error) { case "critical": result = CRITICAL_DEPENDABOTALERTSECURITYADVISORY_SEVERITY default: - return 0, errors.New("Unknown DependabotAlertSecurityAdvisory_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_security_vulnerability_severity.go b/pkg/github/models/dependabot_alert_security_vulnerability_severity.go index 627c1cc2..4f97da91 100644 --- a/pkg/github/models/dependabot_alert_security_vulnerability_severity.go +++ b/pkg/github/models/dependabot_alert_security_vulnerability_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the vulnerability. type DependabotAlertSecurityVulnerability_severity int @@ -27,7 +24,7 @@ func ParseDependabotAlertSecurityVulnerability_severity(v string) (any, error) { case "critical": result = CRITICAL_DEPENDABOTALERTSECURITYVULNERABILITY_SEVERITY default: - return 0, errors.New("Unknown DependabotAlertSecurityVulnerability_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_state.go b/pkg/github/models/dependabot_alert_state.go index d50a35df..9ab24c9c 100644 --- a/pkg/github/models/dependabot_alert_state.go +++ b/pkg/github/models/dependabot_alert_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the Dependabot alert. type DependabotAlert_state int @@ -27,7 +24,7 @@ func ParseDependabotAlert_state(v string) (any, error) { case "open": result = OPEN_DEPENDABOTALERT_STATE default: - return 0, errors.New("Unknown DependabotAlert_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go b/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go index 04803208..f11b603a 100644 --- a/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go +++ b/pkg/github/models/dependabot_alert_with_repository_dependency_scope.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The execution scope of the vulnerable dependency. type DependabotAlertWithRepository_dependency_scope int @@ -21,7 +18,7 @@ func ParseDependabotAlertWithRepository_dependency_scope(v string) (any, error) case "runtime": result = RUNTIME_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_SCOPE default: - return 0, errors.New("Unknown DependabotAlertWithRepository_dependency_scope value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go b/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go index 6e77055f..d7034cff 100644 --- a/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go +++ b/pkg/github/models/dependabot_alert_with_repository_dismissed_reason.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The reason that the alert was dismissed. type DependabotAlertWithRepository_dismissed_reason int @@ -30,7 +27,7 @@ func ParseDependabotAlertWithRepository_dismissed_reason(v string) (any, error) case "tolerable_risk": result = TOLERABLE_RISK_DEPENDABOTALERTWITHREPOSITORY_DISMISSED_REASON default: - return 0, errors.New("Unknown DependabotAlertWithRepository_dismissed_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependabot_alert_with_repository_state.go b/pkg/github/models/dependabot_alert_with_repository_state.go index b679d703..23b5cef6 100644 --- a/pkg/github/models/dependabot_alert_with_repository_state.go +++ b/pkg/github/models/dependabot_alert_with_repository_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the Dependabot alert. type DependabotAlertWithRepository_state int @@ -27,7 +24,7 @@ func ParseDependabotAlertWithRepository_state(v string) (any, error) { case "open": result = OPEN_DEPENDABOTALERTWITHREPOSITORY_STATE default: - return 0, errors.New("Unknown DependabotAlertWithRepository_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependency_graph_diff_change_type.go b/pkg/github/models/dependency_graph_diff_change_type.go index 6fb0c850..066c1a58 100644 --- a/pkg/github/models/dependency_graph_diff_change_type.go +++ b/pkg/github/models/dependency_graph_diff_change_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type DependencyGraphDiff_change_type int const ( @@ -20,7 +17,7 @@ func ParseDependencyGraphDiff_change_type(v string) (any, error) { case "removed": result = REMOVED_DEPENDENCYGRAPHDIFF_CHANGE_TYPE default: - return 0, errors.New("Unknown DependencyGraphDiff_change_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/dependency_graph_diff_scope.go b/pkg/github/models/dependency_graph_diff_scope.go index 8b0eb322..0f5c9f2f 100644 --- a/pkg/github/models/dependency_graph_diff_scope.go +++ b/pkg/github/models/dependency_graph_diff_scope.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. type DependencyGraphDiff_scope int @@ -24,7 +21,7 @@ func ParseDependencyGraphDiff_scope(v string) (any, error) { case "development": result = DEVELOPMENT_DEPENDENCYGRAPHDIFF_SCOPE default: - return 0, errors.New("Unknown DependencyGraphDiff_scope value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go b/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go index 8cb5c811..001e00e3 100644 --- a/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go +++ b/pkg/github/models/deployment_branch_policy_name_pattern_with_type_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether this rule targets a branch or tag type DeploymentBranchPolicyNamePatternWithType_type int @@ -21,7 +18,7 @@ func ParseDeploymentBranchPolicyNamePatternWithType_type(v string) (any, error) case "tag": result = TAG_DEPLOYMENTBRANCHPOLICYNAMEPATTERNWITHTYPE_TYPE default: - return 0, errors.New("Unknown DeploymentBranchPolicyNamePatternWithType_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/deployment_branch_policy_type.go b/pkg/github/models/deployment_branch_policy_type.go index eed41591..a53334dd 100644 --- a/pkg/github/models/deployment_branch_policy_type.go +++ b/pkg/github/models/deployment_branch_policy_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether this rule targets a branch or tag. type DeploymentBranchPolicy_type int @@ -21,7 +18,7 @@ func ParseDeploymentBranchPolicy_type(v string) (any, error) { case "tag": result = TAG_DEPLOYMENTBRANCHPOLICY_TYPE default: - return 0, errors.New("Unknown DeploymentBranchPolicy_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/deployment_reviewer_type.go b/pkg/github/models/deployment_reviewer_type.go index 64d0295f..9d0895a2 100644 --- a/pkg/github/models/deployment_reviewer_type.go +++ b/pkg/github/models/deployment_reviewer_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of reviewer. type DeploymentReviewerType int @@ -21,7 +18,7 @@ func ParseDeploymentReviewerType(v string) (any, error) { case "Team": result = TEAM_DEPLOYMENTREVIEWERTYPE default: - return 0, errors.New("Unknown DeploymentReviewerType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/deployment_status_state.go b/pkg/github/models/deployment_status_state.go index a9cf2047..3a224166 100644 --- a/pkg/github/models/deployment_status_state.go +++ b/pkg/github/models/deployment_status_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the status. type DeploymentStatus_state int @@ -36,7 +33,7 @@ func ParseDeploymentStatus_state(v string) (any, error) { case "in_progress": result = IN_PROGRESS_DEPLOYMENTSTATUS_STATE default: - return 0, errors.New("Unknown DeploymentStatus_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/diff_entry_status.go b/pkg/github/models/diff_entry_status.go index bd97efe2..d0a9cc6a 100644 --- a/pkg/github/models/diff_entry_status.go +++ b/pkg/github/models/diff_entry_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type DiffEntry_status int const ( @@ -35,7 +32,7 @@ func ParseDiffEntry_status(v string) (any, error) { case "unchanged": result = UNCHANGED_DIFFENTRY_STATUS default: - return 0, errors.New("Unknown DiffEntry_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/enabled_repositories.go b/pkg/github/models/enabled_repositories.go index 527bacd4..8f6dcb09 100644 --- a/pkg/github/models/enabled_repositories.go +++ b/pkg/github/models/enabled_repositories.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The policy that controls the repositories in the organization that are allowed to run GitHub Actions. type EnabledRepositories int @@ -24,7 +21,7 @@ func ParseEnabledRepositories(v string) (any, error) { case "selected": result = SELECTED_ENABLEDREPOSITORIES default: - return 0, errors.New("Unknown EnabledRepositories value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/environment_approvals_state.go b/pkg/github/models/environment_approvals_state.go index f3bacf7b..4c0ac8a8 100644 --- a/pkg/github/models/environment_approvals_state.go +++ b/pkg/github/models/environment_approvals_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether deployment to the environment(s) was approved or rejected or pending (with comments) type EnvironmentApprovals_state int @@ -24,7 +21,7 @@ func ParseEnvironmentApprovals_state(v string) (any, error) { case "pending": result = PENDING_ENVIRONMENTAPPROVALS_STATE default: - return 0, errors.New("Unknown EnvironmentApprovals_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/full_repository_merge_commit_message.go b/pkg/github/models/full_repository_merge_commit_message.go index 0f291c5c..b93673bc 100644 --- a/pkg/github/models/full_repository_merge_commit_message.go +++ b/pkg/github/models/full_repository_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type FullRepository_merge_commit_message int @@ -24,7 +21,7 @@ func ParseFullRepository_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_FULLREPOSITORY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown FullRepository_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/full_repository_merge_commit_title.go b/pkg/github/models/full_repository_merge_commit_title.go index 582c9e67..83e96b04 100644 --- a/pkg/github/models/full_repository_merge_commit_title.go +++ b/pkg/github/models/full_repository_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type FullRepository_merge_commit_title int @@ -21,7 +18,7 @@ func ParseFullRepository_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_FULLREPOSITORY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown FullRepository_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/full_repository_squash_merge_commit_message.go b/pkg/github/models/full_repository_squash_merge_commit_message.go index 1564df2a..aa381ea9 100644 --- a/pkg/github/models/full_repository_squash_merge_commit_message.go +++ b/pkg/github/models/full_repository_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type FullRepository_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseFullRepository_squash_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_FULLREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown FullRepository_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/full_repository_squash_merge_commit_title.go b/pkg/github/models/full_repository_squash_merge_commit_title.go index e99fbf53..e4184dd1 100644 --- a/pkg/github/models/full_repository_squash_merge_commit_title.go +++ b/pkg/github/models/full_repository_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type FullRepository_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseFullRepository_squash_merge_commit_title(v string) (any, error) { case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_FULLREPOSITORY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown FullRepository_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/global_advisory_identifiers_type.go b/pkg/github/models/global_advisory_identifiers_type.go index 6bb33380..7edd7dae 100644 --- a/pkg/github/models/global_advisory_identifiers_type.go +++ b/pkg/github/models/global_advisory_identifiers_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of identifier. type GlobalAdvisory_identifiers_type int @@ -21,7 +18,7 @@ func ParseGlobalAdvisory_identifiers_type(v string) (any, error) { case "GHSA": result = GHSA_GLOBALADVISORY_IDENTIFIERS_TYPE default: - return 0, errors.New("Unknown GlobalAdvisory_identifiers_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/global_advisory_severity.go b/pkg/github/models/global_advisory_severity.go index c486526b..38f9e0f8 100644 --- a/pkg/github/models/global_advisory_severity.go +++ b/pkg/github/models/global_advisory_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. type GlobalAdvisory_severity int @@ -30,7 +27,7 @@ func ParseGlobalAdvisory_severity(v string) (any, error) { case "unknown": result = UNKNOWN_GLOBALADVISORY_SEVERITY default: - return 0, errors.New("Unknown GlobalAdvisory_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/global_advisory_type.go b/pkg/github/models/global_advisory_type.go index 56c44a2a..e22f11db 100644 --- a/pkg/github/models/global_advisory_type.go +++ b/pkg/github/models/global_advisory_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of advisory. type GlobalAdvisory_type int @@ -24,7 +21,7 @@ func ParseGlobalAdvisory_type(v string) (any, error) { case "malware": result = MALWARE_GLOBALADVISORY_TYPE default: - return 0, errors.New("Unknown GlobalAdvisory_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/hook_delivery.go b/pkg/github/models/hook_delivery.go index 5bc234ed..a2e0b7a6 100644 --- a/pkg/github/models/hook_delivery.go +++ b/pkg/github/models/hook_delivery.go @@ -35,6 +35,8 @@ type HookDelivery struct { status *string // Status code received when delivery was made. status_code *int32 + // Time when the webhook delivery was throttled. + throttled_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The URL target of the delivery. url *string } @@ -209,6 +211,16 @@ func (m *HookDelivery) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["throttled_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetThrottledAt(val) + } + return nil + } res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -266,6 +278,11 @@ func (m *HookDelivery) GetStatus()(*string) { func (m *HookDelivery) GetStatusCode()(*int32) { return m.status_code } +// GetThrottledAt gets the throttled_at property value. Time when the webhook delivery was throttled. +// returns a *Time when successful +func (m *HookDelivery) GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.throttled_at +} // GetUrl gets the url property value. The URL target of the delivery. // returns a *string when successful func (m *HookDelivery) GetUrl()(*string) { @@ -351,6 +368,12 @@ func (m *HookDelivery) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + { + err := writer.WriteTimeValue("throttled_at", m.GetThrottledAt()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("url", m.GetUrl()) if err != nil { @@ -421,6 +444,10 @@ func (m *HookDelivery) SetStatus(value *string)() { func (m *HookDelivery) SetStatusCode(value *int32)() { m.status_code = value } +// SetThrottledAt sets the throttled_at property value. Time when the webhook delivery was throttled. +func (m *HookDelivery) SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.throttled_at = value +} // SetUrl sets the url property value. The URL target of the delivery. func (m *HookDelivery) SetUrl(value *string)() { m.url = value @@ -441,6 +468,7 @@ type HookDeliveryable interface { GetResponse()(HookDelivery_responseable) GetStatus()(*string) GetStatusCode()(*int32) + GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetUrl()(*string) SetAction(value *string)() SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() @@ -455,5 +483,6 @@ type HookDeliveryable interface { SetResponse(value HookDelivery_responseable)() SetStatus(value *string)() SetStatusCode(value *int32)() + SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetUrl(value *string)() } diff --git a/pkg/github/models/hook_delivery_item.go b/pkg/github/models/hook_delivery_item.go index 6d3d49a3..0340ded1 100644 --- a/pkg/github/models/hook_delivery_item.go +++ b/pkg/github/models/hook_delivery_item.go @@ -31,6 +31,8 @@ type HookDeliveryItem struct { status *string // Status code received when delivery was made. status_code *int32 + // Time when the webhook delivery was throttled. + throttled_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time } // NewHookDeliveryItem instantiates a new HookDeliveryItem and sets the default values. func NewHookDeliveryItem()(*HookDeliveryItem) { @@ -183,6 +185,16 @@ func (m *HookDeliveryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["throttled_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetThrottledAt(val) + } + return nil + } return res } // GetGuid gets the guid property value. Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). @@ -220,6 +232,11 @@ func (m *HookDeliveryItem) GetStatus()(*string) { func (m *HookDeliveryItem) GetStatusCode()(*int32) { return m.status_code } +// GetThrottledAt gets the throttled_at property value. Time when the webhook delivery was throttled. +// returns a *Time when successful +func (m *HookDeliveryItem) GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.throttled_at +} // Serialize serializes information the current object func (m *HookDeliveryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -288,6 +305,12 @@ func (m *HookDeliveryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + { + err := writer.WriteTimeValue("throttled_at", m.GetThrottledAt()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -344,6 +367,10 @@ func (m *HookDeliveryItem) SetStatus(value *string)() { func (m *HookDeliveryItem) SetStatusCode(value *int32)() { m.status_code = value } +// SetThrottledAt sets the throttled_at property value. Time when the webhook delivery was throttled. +func (m *HookDeliveryItem) SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.throttled_at = value +} type HookDeliveryItemable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -358,6 +385,7 @@ type HookDeliveryItemable interface { GetRepositoryId()(*int32) GetStatus()(*string) GetStatusCode()(*int32) + GetThrottledAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) SetAction(value *string)() SetDeliveredAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDuration(value *float64)() @@ -369,4 +397,5 @@ type HookDeliveryItemable interface { SetRepositoryId(value *int32)() SetStatus(value *string)() SetStatusCode(value *int32)() + SetThrottledAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() } diff --git a/pkg/github/models/import_status.go b/pkg/github/models/import_status.go index eae62612..f1b76613 100644 --- a/pkg/github/models/import_status.go +++ b/pkg/github/models/import_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type Import_status int const ( @@ -62,7 +59,7 @@ func ParseImport_status(v string) (any, error) { case "detection_needs_auth": result = DETECTION_NEEDS_AUTH_IMPORT_STATUS default: - return 0, errors.New("Unknown Import_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/installation_repository_selection.go b/pkg/github/models/installation_repository_selection.go index 8f8e8b09..7fe82de7 100644 --- a/pkg/github/models/installation_repository_selection.go +++ b/pkg/github/models/installation_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Describe whether all repositories have been selected or there's a selection involved type Installation_repository_selection int @@ -21,7 +18,7 @@ func ParseInstallation_repository_selection(v string) (any, error) { case "selected": result = SELECTED_INSTALLATION_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown Installation_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/installation_token_repository_selection.go b/pkg/github/models/installation_token_repository_selection.go index 75a98374..49cfe54e 100644 --- a/pkg/github/models/installation_token_repository_selection.go +++ b/pkg/github/models/installation_token_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type InstallationToken_repository_selection int const ( @@ -20,7 +17,7 @@ func ParseInstallationToken_repository_selection(v string) (any, error) { case "selected": result = SELECTED_INSTALLATIONTOKEN_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown InstallationToken_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/interaction_expiry.go b/pkg/github/models/interaction_expiry.go index f49b20e1..7f1ae57a 100644 --- a/pkg/github/models/interaction_expiry.go +++ b/pkg/github/models/interaction_expiry.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The duration of the interaction restriction. Default: `one_day`. type InteractionExpiry int @@ -30,7 +27,7 @@ func ParseInteractionExpiry(v string) (any, error) { case "six_months": result = SIX_MONTHS_INTERACTIONEXPIRY default: - return 0, errors.New("Unknown InteractionExpiry value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/interaction_group.go b/pkg/github/models/interaction_group.go index 38a73fe7..0f5b65c6 100644 --- a/pkg/github/models/interaction_group.go +++ b/pkg/github/models/interaction_group.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. type InteractionGroup int @@ -24,7 +21,7 @@ func ParseInteractionGroup(v string) (any, error) { case "collaborators_only": result = COLLABORATORS_ONLY_INTERACTIONGROUP default: - return 0, errors.New("Unknown InteractionGroup value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/issue_state_reason.go b/pkg/github/models/issue_state_reason.go index 130c6b67..5a18af7a 100644 --- a/pkg/github/models/issue_state_reason.go +++ b/pkg/github/models/issue_state_reason.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The reason for the current state type Issue_state_reason int @@ -24,7 +21,7 @@ func ParseIssue_state_reason(v string) (any, error) { case "not_planned": result = NOT_PLANNED_ISSUE_STATE_REASON default: - return 0, errors.New("Unknown Issue_state_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/job_conclusion.go b/pkg/github/models/job_conclusion.go index 7bd35d83..3c573f4f 100644 --- a/pkg/github/models/job_conclusion.go +++ b/pkg/github/models/job_conclusion.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The outcome of the job. type Job_conclusion int @@ -36,7 +33,7 @@ func ParseJob_conclusion(v string) (any, error) { case "action_required": result = ACTION_REQUIRED_JOB_CONCLUSION default: - return 0, errors.New("Unknown Job_conclusion value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/job_status.go b/pkg/github/models/job_status.go index ad86954c..364598d5 100644 --- a/pkg/github/models/job_status.go +++ b/pkg/github/models/job_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The phase of the lifecycle that the job is currently in. type Job_status int @@ -33,7 +30,7 @@ func ParseJob_status(v string) (any, error) { case "pending": result = PENDING_JOB_STATUS default: - return 0, errors.New("Unknown Job_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/job_steps_status.go b/pkg/github/models/job_steps_status.go index d6163e45..a06fa003 100644 --- a/pkg/github/models/job_steps_status.go +++ b/pkg/github/models/job_steps_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The phase of the lifecycle that the job is currently in. type Job_steps_status int @@ -24,7 +21,7 @@ func ParseJob_steps_status(v string) (any, error) { case "completed": result = COMPLETED_JOB_STEPS_STATUS default: - return 0, errors.New("Unknown Job_steps_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/marketplace_listing_plan_price_model.go b/pkg/github/models/marketplace_listing_plan_price_model.go index 1905efb7..640d126b 100644 --- a/pkg/github/models/marketplace_listing_plan_price_model.go +++ b/pkg/github/models/marketplace_listing_plan_price_model.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type MarketplaceListingPlan_price_model int const ( @@ -23,7 +20,7 @@ func ParseMarketplaceListingPlan_price_model(v string) (any, error) { case "PER_UNIT": result = PER_UNIT_MARKETPLACELISTINGPLAN_PRICE_MODEL default: - return 0, errors.New("Unknown MarketplaceListingPlan_price_model value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/merged_upstream_merge_type.go b/pkg/github/models/merged_upstream_merge_type.go index e8690418..7ab5e88a 100644 --- a/pkg/github/models/merged_upstream_merge_type.go +++ b/pkg/github/models/merged_upstream_merge_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type MergedUpstream_merge_type int const ( @@ -23,7 +20,7 @@ func ParseMergedUpstream_merge_type(v string) (any, error) { case "none": result = NONE_MERGEDUPSTREAM_MERGE_TYPE default: - return 0, errors.New("Unknown MergedUpstream_merge_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/milestone_state.go b/pkg/github/models/milestone_state.go index 1ff9c492..e1210a90 100644 --- a/pkg/github/models/milestone_state.go +++ b/pkg/github/models/milestone_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the milestone. type Milestone_state int @@ -21,7 +18,7 @@ func ParseMilestone_state(v string) (any, error) { case "closed": result = CLOSED_MILESTONE_STATE default: - return 0, errors.New("Unknown Milestone_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_codespace_machine_prebuild_availability.go b/pkg/github/models/nullable_codespace_machine_prebuild_availability.go index c690735e..6f7cb948 100644 --- a/pkg/github/models/nullable_codespace_machine_prebuild_availability.go +++ b/pkg/github/models/nullable_codespace_machine_prebuild_availability.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. type NullableCodespaceMachine_prebuild_availability int @@ -24,7 +21,7 @@ func ParseNullableCodespaceMachine_prebuild_availability(v string) (any, error) case "in_progress": result = IN_PROGRESS_NULLABLECODESPACEMACHINE_PREBUILD_AVAILABILITY default: - return 0, errors.New("Unknown NullableCodespaceMachine_prebuild_availability value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_issue_state_reason.go b/pkg/github/models/nullable_issue_state_reason.go index 74b1a964..61d0ed5b 100644 --- a/pkg/github/models/nullable_issue_state_reason.go +++ b/pkg/github/models/nullable_issue_state_reason.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The reason for the current state type NullableIssue_state_reason int @@ -24,7 +21,7 @@ func ParseNullableIssue_state_reason(v string) (any, error) { case "not_planned": result = NOT_PLANNED_NULLABLEISSUE_STATE_REASON default: - return 0, errors.New("Unknown NullableIssue_state_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_milestone_state.go b/pkg/github/models/nullable_milestone_state.go index 02a8c64f..abcd5ae3 100644 --- a/pkg/github/models/nullable_milestone_state.go +++ b/pkg/github/models/nullable_milestone_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the milestone. type NullableMilestone_state int @@ -21,7 +18,7 @@ func ParseNullableMilestone_state(v string) (any, error) { case "closed": result = CLOSED_NULLABLEMILESTONE_STATE default: - return 0, errors.New("Unknown NullableMilestone_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_repository_merge_commit_message.go b/pkg/github/models/nullable_repository_merge_commit_message.go index 8799176d..fe229660 100644 --- a/pkg/github/models/nullable_repository_merge_commit_message.go +++ b/pkg/github/models/nullable_repository_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type NullableRepository_merge_commit_message int @@ -24,7 +21,7 @@ func ParseNullableRepository_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_NULLABLEREPOSITORY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown NullableRepository_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_repository_merge_commit_title.go b/pkg/github/models/nullable_repository_merge_commit_title.go index 513530c5..06fbbd7f 100644 --- a/pkg/github/models/nullable_repository_merge_commit_title.go +++ b/pkg/github/models/nullable_repository_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type NullableRepository_merge_commit_title int @@ -21,7 +18,7 @@ func ParseNullableRepository_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_NULLABLEREPOSITORY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown NullableRepository_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_repository_squash_merge_commit_message.go b/pkg/github/models/nullable_repository_squash_merge_commit_message.go index 77bc0ee3..2acd6cdb 100644 --- a/pkg/github/models/nullable_repository_squash_merge_commit_message.go +++ b/pkg/github/models/nullable_repository_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type NullableRepository_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseNullableRepository_squash_merge_commit_message(v string) (any, error) case "BLANK": result = BLANK_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown NullableRepository_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_repository_squash_merge_commit_title.go b/pkg/github/models/nullable_repository_squash_merge_commit_title.go index 57aef86b..cd27d7ef 100644 --- a/pkg/github/models/nullable_repository_squash_merge_commit_title.go +++ b/pkg/github/models/nullable_repository_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type NullableRepository_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseNullableRepository_squash_merge_commit_title(v string) (any, error) { case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_NULLABLEREPOSITORY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown NullableRepository_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/nullable_scoped_installation_repository_selection.go b/pkg/github/models/nullable_scoped_installation_repository_selection.go index 393459a9..d53c3e91 100644 --- a/pkg/github/models/nullable_scoped_installation_repository_selection.go +++ b/pkg/github/models/nullable_scoped_installation_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Describe whether all repositories have been selected or there's a selection involved type NullableScopedInstallation_repository_selection int @@ -21,7 +18,7 @@ func ParseNullableScopedInstallation_repository_selection(v string) (any, error) case "selected": result = SELECTED_NULLABLESCOPEDINSTALLATION_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown NullableScopedInstallation_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/org_custom_property_value_type.go b/pkg/github/models/org_custom_property_value_type.go index c81a64bb..0a12fc5a 100644 --- a/pkg/github/models/org_custom_property_value_type.go +++ b/pkg/github/models/org_custom_property_value_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of the value for the property type OrgCustomProperty_value_type int @@ -21,7 +18,7 @@ func ParseOrgCustomProperty_value_type(v string) (any, error) { case "single_select": result = SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE default: - return 0, errors.New("Unknown OrgCustomProperty_value_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/org_custom_property_values_editable_by.go b/pkg/github/models/org_custom_property_values_editable_by.go index a21cfec6..6a8e3487 100644 --- a/pkg/github/models/org_custom_property_values_editable_by.go +++ b/pkg/github/models/org_custom_property_values_editable_by.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Who can edit the values of the property type OrgCustomProperty_values_editable_by int @@ -21,7 +18,7 @@ func ParseOrgCustomProperty_values_editable_by(v string) (any, error) { case "org_and_repo_actors": result = ORG_AND_REPO_ACTORS_ORGCUSTOMPROPERTY_VALUES_EDITABLE_BY default: - return 0, errors.New("Unknown OrgCustomProperty_values_editable_by value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/org_membership_role.go b/pkg/github/models/org_membership_role.go index 2626a419..b28386fa 100644 --- a/pkg/github/models/org_membership_role.go +++ b/pkg/github/models/org_membership_role.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The user's membership type in the organization. type OrgMembership_role int @@ -24,7 +21,7 @@ func ParseOrgMembership_role(v string) (any, error) { case "billing_manager": result = BILLING_MANAGER_ORGMEMBERSHIP_ROLE default: - return 0, errors.New("Unknown OrgMembership_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/org_membership_state.go b/pkg/github/models/org_membership_state.go index d0f4d50c..17bd76e2 100644 --- a/pkg/github/models/org_membership_state.go +++ b/pkg/github/models/org_membership_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. type OrgMembership_state int @@ -21,7 +18,7 @@ func ParseOrgMembership_state(v string) (any, error) { case "pending": result = PENDING_ORGMEMBERSHIP_STATE default: - return 0, errors.New("Unknown OrgMembership_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_actions_secret_visibility.go b/pkg/github/models/organization_actions_secret_visibility.go index f4cc988e..e31e4d76 100644 --- a/pkg/github/models/organization_actions_secret_visibility.go +++ b/pkg/github/models/organization_actions_secret_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Visibility of a secret type OrganizationActionsSecret_visibility int @@ -24,7 +21,7 @@ func ParseOrganizationActionsSecret_visibility(v string) (any, error) { case "selected": result = SELECTED_ORGANIZATIONACTIONSSECRET_VISIBILITY default: - return 0, errors.New("Unknown OrganizationActionsSecret_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_actions_variable_visibility.go b/pkg/github/models/organization_actions_variable_visibility.go index ef61952a..33fef808 100644 --- a/pkg/github/models/organization_actions_variable_visibility.go +++ b/pkg/github/models/organization_actions_variable_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Visibility of a variable type OrganizationActionsVariable_visibility int @@ -24,7 +21,7 @@ func ParseOrganizationActionsVariable_visibility(v string) (any, error) { case "selected": result = SELECTED_ORGANIZATIONACTIONSVARIABLE_VISIBILITY default: - return 0, errors.New("Unknown OrganizationActionsVariable_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_dependabot_secret_visibility.go b/pkg/github/models/organization_dependabot_secret_visibility.go index 8609e727..aedb710e 100644 --- a/pkg/github/models/organization_dependabot_secret_visibility.go +++ b/pkg/github/models/organization_dependabot_secret_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Visibility of a secret type OrganizationDependabotSecret_visibility int @@ -24,7 +21,7 @@ func ParseOrganizationDependabotSecret_visibility(v string) (any, error) { case "selected": result = SELECTED_ORGANIZATIONDEPENDABOTSECRET_VISIBILITY default: - return 0, errors.New("Unknown OrganizationDependabotSecret_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_programmatic_access_grant_repository_selection.go b/pkg/github/models/organization_programmatic_access_grant_repository_selection.go index f77c53f2..512f52a7 100644 --- a/pkg/github/models/organization_programmatic_access_grant_repository_selection.go +++ b/pkg/github/models/organization_programmatic_access_grant_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Type of repository selection requested. type OrganizationProgrammaticAccessGrant_repository_selection int @@ -24,7 +21,7 @@ func ParseOrganizationProgrammaticAccessGrant_repository_selection(v string) (an case "subset": result = SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANT_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown OrganizationProgrammaticAccessGrant_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go b/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go index 50a6b214..84c27e70 100644 --- a/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go +++ b/pkg/github/models/organization_programmatic_access_grant_request_repository_selection.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Type of repository selection requested. type OrganizationProgrammaticAccessGrantRequest_repository_selection int @@ -24,7 +21,7 @@ func ParseOrganizationProgrammaticAccessGrantRequest_repository_selection(v stri case "subset": result = SUBSET_ORGANIZATIONPROGRAMMATICACCESSGRANTREQUEST_REPOSITORY_SELECTION default: - return 0, errors.New("Unknown OrganizationProgrammaticAccessGrantRequest_repository_selection value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/organization_secret_scanning_alert_validity.go b/pkg/github/models/organization_secret_scanning_alert_validity.go index 4fc12b76..037132bc 100644 --- a/pkg/github/models/organization_secret_scanning_alert_validity.go +++ b/pkg/github/models/organization_secret_scanning_alert_validity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The token status as of the latest validity check. type OrganizationSecretScanningAlert_validity int @@ -24,7 +21,7 @@ func ParseOrganizationSecretScanningAlert_validity(v string) (any, error) { case "unknown": result = UNKNOWN_ORGANIZATIONSECRETSCANNINGALERT_VALIDITY default: - return 0, errors.New("Unknown OrganizationSecretScanningAlert_validity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/package_package_type.go b/pkg/github/models/package_package_type.go index cee35139..ca262d91 100644 --- a/pkg/github/models/package_package_type.go +++ b/pkg/github/models/package_package_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type Package_package_type int const ( @@ -32,7 +29,7 @@ func ParsePackage_package_type(v string) (any, error) { case "container": result = CONTAINER_PACKAGE_PACKAGE_TYPE default: - return 0, errors.New("Unknown Package_package_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/package_version_metadata_package_type.go b/pkg/github/models/package_version_metadata_package_type.go index 56d93a53..e9567f86 100644 --- a/pkg/github/models/package_version_metadata_package_type.go +++ b/pkg/github/models/package_version_metadata_package_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type PackageVersion_metadata_package_type int const ( @@ -32,7 +29,7 @@ func ParsePackageVersion_metadata_package_type(v string) (any, error) { case "container": result = CONTAINER_PACKAGEVERSION_METADATA_PACKAGE_TYPE default: - return 0, errors.New("Unknown PackageVersion_metadata_package_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/package_visibility.go b/pkg/github/models/package_visibility.go index fed8e15c..4bf6f51b 100644 --- a/pkg/github/models/package_visibility.go +++ b/pkg/github/models/package_visibility.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type Package_visibility int const ( @@ -20,7 +17,7 @@ func ParsePackage_visibility(v string) (any, error) { case "public": result = PUBLIC_PACKAGE_VISIBILITY default: - return 0, errors.New("Unknown Package_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/page_build_type.go b/pkg/github/models/page_build_type.go index 7c4faf24..59d215a5 100644 --- a/pkg/github/models/page_build_type.go +++ b/pkg/github/models/page_build_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The process in which the Page will be built. type Page_build_type int @@ -21,7 +18,7 @@ func ParsePage_build_type(v string) (any, error) { case "workflow": result = WORKFLOW_PAGE_BUILD_TYPE default: - return 0, errors.New("Unknown Page_build_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/page_protected_domain_state.go b/pkg/github/models/page_protected_domain_state.go index c00a7635..6d952ffe 100644 --- a/pkg/github/models/page_protected_domain_state.go +++ b/pkg/github/models/page_protected_domain_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state if the domain is verified type Page_protected_domain_state int @@ -24,7 +21,7 @@ func ParsePage_protected_domain_state(v string) (any, error) { case "unverified": result = UNVERIFIED_PAGE_PROTECTED_DOMAIN_STATE default: - return 0, errors.New("Unknown Page_protected_domain_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/page_status.go b/pkg/github/models/page_status.go index 5228e692..6a56aa17 100644 --- a/pkg/github/models/page_status.go +++ b/pkg/github/models/page_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The status of the most recent build of the Page. type Page_status int @@ -24,7 +21,7 @@ func ParsePage_status(v string) (any, error) { case "errored": result = ERRORED_PAGE_STATUS default: - return 0, errors.New("Unknown Page_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pages_deployment_status_status.go b/pkg/github/models/pages_deployment_status_status.go index b284bc65..63a5a978 100644 --- a/pkg/github/models/pages_deployment_status_status.go +++ b/pkg/github/models/pages_deployment_status_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The current status of the deployment. type PagesDeploymentStatus_status int @@ -48,7 +45,7 @@ func ParsePagesDeploymentStatus_status(v string) (any, error) { case "succeed": result = SUCCEED_PAGESDEPLOYMENTSTATUS_STATUS default: - return 0, errors.New("Unknown PagesDeploymentStatus_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pages_https_certificate_state.go b/pkg/github/models/pages_https_certificate_state.go index 8973a06d..294e4543 100644 --- a/pkg/github/models/pages_https_certificate_state.go +++ b/pkg/github/models/pages_https_certificate_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type PagesHttpsCertificate_state int const ( @@ -50,7 +47,7 @@ func ParsePagesHttpsCertificate_state(v string) (any, error) { case "dns_changed": result = DNS_CHANGED_PAGESHTTPSCERTIFICATE_STATE default: - return 0, errors.New("Unknown PagesHttpsCertificate_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/private_vulnerability_report_create_severity.go b/pkg/github/models/private_vulnerability_report_create_severity.go index 1d02cc5a..e4d94f24 100644 --- a/pkg/github/models/private_vulnerability_report_create_severity.go +++ b/pkg/github/models/private_vulnerability_report_create_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. type PrivateVulnerabilityReportCreate_severity int @@ -27,7 +24,7 @@ func ParsePrivateVulnerabilityReportCreate_severity(v string) (any, error) { case "low": result = LOW_PRIVATEVULNERABILITYREPORTCREATE_SEVERITY default: - return 0, errors.New("Unknown PrivateVulnerabilityReportCreate_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/project_organization_permission.go b/pkg/github/models/project_organization_permission.go index 20b829c7..3dea708e 100644 --- a/pkg/github/models/project_organization_permission.go +++ b/pkg/github/models/project_organization_permission.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The baseline permission that all organization members have on this project. Only present if owner is an organization. type Project_organization_permission int @@ -27,7 +24,7 @@ func ParseProject_organization_permission(v string) (any, error) { case "none": result = NONE_PROJECT_ORGANIZATION_PERMISSION default: - return 0, errors.New("Unknown Project_organization_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_review_comment_side.go b/pkg/github/models/pull_request_review_comment_side.go index b94739b7..1f0602a5 100644 --- a/pkg/github/models/pull_request_review_comment_side.go +++ b/pkg/github/models/pull_request_review_comment_side.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment type PullRequestReviewComment_side int @@ -21,7 +18,7 @@ func ParsePullRequestReviewComment_side(v string) (any, error) { case "RIGHT": result = RIGHT_PULLREQUESTREVIEWCOMMENT_SIDE default: - return 0, errors.New("Unknown PullRequestReviewComment_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_review_comment_start_side.go b/pkg/github/models/pull_request_review_comment_start_side.go index a6583519..a644d4a5 100644 --- a/pkg/github/models/pull_request_review_comment_start_side.go +++ b/pkg/github/models/pull_request_review_comment_start_side.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The side of the first line of the range for a multi-line comment. type PullRequestReviewComment_start_side int @@ -21,7 +18,7 @@ func ParsePullRequestReviewComment_start_side(v string) (any, error) { case "RIGHT": result = RIGHT_PULLREQUESTREVIEWCOMMENT_START_SIDE default: - return 0, errors.New("Unknown PullRequestReviewComment_start_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_review_comment_subject_type.go b/pkg/github/models/pull_request_review_comment_subject_type.go index deb3ad4c..bb660791 100644 --- a/pkg/github/models/pull_request_review_comment_subject_type.go +++ b/pkg/github/models/pull_request_review_comment_subject_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level at which the comment is targeted, can be a diff line or a file. type PullRequestReviewComment_subject_type int @@ -21,7 +18,7 @@ func ParsePullRequestReviewComment_subject_type(v string) (any, error) { case "file": result = FILE_PULLREQUESTREVIEWCOMMENT_SUBJECT_TYPE default: - return 0, errors.New("Unknown PullRequestReviewComment_subject_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_state.go b/pkg/github/models/pull_request_state.go index 135ef8cc..73d6b034 100644 --- a/pkg/github/models/pull_request_state.go +++ b/pkg/github/models/pull_request_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of this Pull Request. Either `open` or `closed`. type PullRequest_state int @@ -21,7 +18,7 @@ func ParsePullRequest_state(v string) (any, error) { case "closed": result = CLOSED_PULLREQUEST_STATE default: - return 0, errors.New("Unknown PullRequest_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_webhook_merge_commit_message.go b/pkg/github/models/pull_request_webhook_merge_commit_message.go index a34f5053..02e80125 100644 --- a/pkg/github/models/pull_request_webhook_merge_commit_message.go +++ b/pkg/github/models/pull_request_webhook_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type PullRequestWebhook_merge_commit_message int @@ -24,7 +21,7 @@ func ParsePullRequestWebhook_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown PullRequestWebhook_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_webhook_merge_commit_title.go b/pkg/github/models/pull_request_webhook_merge_commit_title.go index 7a660123..ea459685 100644 --- a/pkg/github/models/pull_request_webhook_merge_commit_title.go +++ b/pkg/github/models/pull_request_webhook_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). type PullRequestWebhook_merge_commit_title int @@ -21,7 +18,7 @@ func ParsePullRequestWebhook_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown PullRequestWebhook_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go index 45003c9f..7281b3f9 100644 --- a/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type PullRequestWebhook_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParsePullRequestWebhook_squash_merge_commit_message(v string) (any, error) case "BLANK": result = BLANK_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go index 6247b099..f4dd75f0 100644 --- a/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type PullRequestWebhook_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParsePullRequestWebhook_squash_merge_commit_title(v string) (any, error) { case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/reaction_content.go b/pkg/github/models/reaction_content.go index 070a556a..92557557 100644 --- a/pkg/github/models/reaction_content.go +++ b/pkg/github/models/reaction_content.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The reaction to use type Reaction_content int @@ -39,7 +36,7 @@ func ParseReaction_content(v string) (any, error) { case "eyes": result = EYES_REACTION_CONTENT default: - return 0, errors.New("Unknown Reaction_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/release_asset_state.go b/pkg/github/models/release_asset_state.go index 49e5417a..5e1f5f16 100644 --- a/pkg/github/models/release_asset_state.go +++ b/pkg/github/models/release_asset_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // State of the release asset. type ReleaseAsset_state int @@ -21,7 +18,7 @@ func ParseReleaseAsset_state(v string) (any, error) { case "open": result = OPEN_RELEASEASSET_STATE default: - return 0, errors.New("Unknown ReleaseAsset_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_create_severity.go b/pkg/github/models/repository_advisory_create_severity.go index e6c6a632..f12bb939 100644 --- a/pkg/github/models/repository_advisory_create_severity.go +++ b/pkg/github/models/repository_advisory_create_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. type RepositoryAdvisoryCreate_severity int @@ -27,7 +24,7 @@ func ParseRepositoryAdvisoryCreate_severity(v string) (any, error) { case "low": result = LOW_REPOSITORYADVISORYCREATE_SEVERITY default: - return 0, errors.New("Unknown RepositoryAdvisoryCreate_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_credit_state.go b/pkg/github/models/repository_advisory_credit_state.go index 00b230fe..86a41907 100644 --- a/pkg/github/models/repository_advisory_credit_state.go +++ b/pkg/github/models/repository_advisory_credit_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the user's acceptance of the credit. type RepositoryAdvisoryCredit_state int @@ -24,7 +21,7 @@ func ParseRepositoryAdvisoryCredit_state(v string) (any, error) { case "pending": result = PENDING_REPOSITORYADVISORYCREDIT_STATE default: - return 0, errors.New("Unknown RepositoryAdvisoryCredit_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_identifiers_type.go b/pkg/github/models/repository_advisory_identifiers_type.go index 1cfd6f02..cb5bb2d4 100644 --- a/pkg/github/models/repository_advisory_identifiers_type.go +++ b/pkg/github/models/repository_advisory_identifiers_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of identifier. type RepositoryAdvisory_identifiers_type int @@ -21,7 +18,7 @@ func ParseRepositoryAdvisory_identifiers_type(v string) (any, error) { case "GHSA": result = GHSA_REPOSITORYADVISORY_IDENTIFIERS_TYPE default: - return 0, errors.New("Unknown RepositoryAdvisory_identifiers_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_severity.go b/pkg/github/models/repository_advisory_severity.go index c9a8cf05..0afdd9be 100644 --- a/pkg/github/models/repository_advisory_severity.go +++ b/pkg/github/models/repository_advisory_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. type RepositoryAdvisory_severity int @@ -27,7 +24,7 @@ func ParseRepositoryAdvisory_severity(v string) (any, error) { case "low": result = LOW_REPOSITORYADVISORY_SEVERITY default: - return 0, errors.New("Unknown RepositoryAdvisory_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_state.go b/pkg/github/models/repository_advisory_state.go index ba494975..5ca3fc31 100644 --- a/pkg/github/models/repository_advisory_state.go +++ b/pkg/github/models/repository_advisory_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the advisory. type RepositoryAdvisory_state int @@ -30,7 +27,7 @@ func ParseRepositoryAdvisory_state(v string) (any, error) { case "triage": result = TRIAGE_REPOSITORYADVISORY_STATE default: - return 0, errors.New("Unknown RepositoryAdvisory_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_update_severity.go b/pkg/github/models/repository_advisory_update_severity.go index 1ce74d41..72588bae 100644 --- a/pkg/github/models/repository_advisory_update_severity.go +++ b/pkg/github/models/repository_advisory_update_severity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. type RepositoryAdvisoryUpdate_severity int @@ -27,7 +24,7 @@ func ParseRepositoryAdvisoryUpdate_severity(v string) (any, error) { case "low": result = LOW_REPOSITORYADVISORYUPDATE_SEVERITY default: - return 0, errors.New("Unknown RepositoryAdvisoryUpdate_severity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_advisory_update_state.go b/pkg/github/models/repository_advisory_update_state.go index 7b4f1e80..a50d7f29 100644 --- a/pkg/github/models/repository_advisory_update_state.go +++ b/pkg/github/models/repository_advisory_update_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the advisory. type RepositoryAdvisoryUpdate_state int @@ -24,7 +21,7 @@ func ParseRepositoryAdvisoryUpdate_state(v string) (any, error) { case "draft": result = DRAFT_REPOSITORYADVISORYUPDATE_STATE default: - return 0, errors.New("Unknown RepositoryAdvisoryUpdate_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_invitation_permissions.go b/pkg/github/models/repository_invitation_permissions.go index 83251135..e407003d 100644 --- a/pkg/github/models/repository_invitation_permissions.go +++ b/pkg/github/models/repository_invitation_permissions.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The permission associated with the invitation. type RepositoryInvitation_permissions int @@ -30,7 +27,7 @@ func ParseRepositoryInvitation_permissions(v string) (any, error) { case "maintain": result = MAINTAIN_REPOSITORYINVITATION_PERMISSIONS default: - return 0, errors.New("Unknown RepositoryInvitation_permissions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_merge_commit_message.go b/pkg/github/models/repository_merge_commit_message.go index 78451194..39c8840a 100644 --- a/pkg/github/models/repository_merge_commit_message.go +++ b/pkg/github/models/repository_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type Repository_merge_commit_message int @@ -24,7 +21,7 @@ func ParseRepository_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_REPOSITORY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown Repository_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_merge_commit_title.go b/pkg/github/models/repository_merge_commit_title.go index a1816e67..7e7aa618 100644 --- a/pkg/github/models/repository_merge_commit_title.go +++ b/pkg/github/models/repository_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type Repository_merge_commit_title int @@ -21,7 +18,7 @@ func ParseRepository_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_REPOSITORY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown Repository_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule.go b/pkg/github/models/repository_rule.go index 64a538ba..f530258b 100644 --- a/pkg/github/models/repository_rule.go +++ b/pkg/github/models/repository_rule.go @@ -4,16 +4,8 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// RepositoryRule composed type wrapper for classes File_extension_restrictionable, File_path_restrictionable, Max_file_path_lengthable, Max_file_sizeable, RepositoryRuleBranchNamePatternable, RepositoryRuleCodeScanningable, RepositoryRuleCommitAuthorEmailPatternable, RepositoryRuleCommitMessagePatternable, RepositoryRuleCommitterEmailPatternable, RepositoryRuleCreationable, RepositoryRuleDeletionable, RepositoryRuleNonFastForwardable, RepositoryRulePullRequestable, RepositoryRuleRequiredDeploymentsable, RepositoryRuleRequiredLinearHistoryable, RepositoryRuleRequiredSignaturesable, RepositoryRuleRequiredStatusChecksable, RepositoryRuleTagNamePatternable, RepositoryRuleUpdateable, RepositoryRuleWorkflowsable +// RepositoryRule composed type wrapper for classes RepositoryRuleBranchNamePatternable, RepositoryRuleCodeScanningable, RepositoryRuleCommitAuthorEmailPatternable, RepositoryRuleCommitMessagePatternable, RepositoryRuleCommitterEmailPatternable, RepositoryRuleCreationable, RepositoryRuleDeletionable, RepositoryRuleMember1able, RepositoryRuleMember2able, RepositoryRuleMember3able, RepositoryRuleMember4able, RepositoryRuleNonFastForwardable, RepositoryRulePullRequestable, RepositoryRuleRequiredDeploymentsable, RepositoryRuleRequiredLinearHistoryable, RepositoryRuleRequiredSignaturesable, RepositoryRuleRequiredStatusChecksable, RepositoryRuleTagNamePatternable, RepositoryRuleUpdateable, RepositoryRuleWorkflowsable type RepositoryRule struct { - // Composed type representation for type File_extension_restrictionable - file_extension_restriction File_extension_restrictionable - // Composed type representation for type File_path_restrictionable - file_path_restriction File_path_restrictionable - // Composed type representation for type Max_file_path_lengthable - max_file_path_length Max_file_path_lengthable - // Composed type representation for type Max_file_sizeable - max_file_size Max_file_sizeable // Composed type representation for type RepositoryRuleBranchNamePatternable repositoryRuleBranchNamePattern RepositoryRuleBranchNamePatternable // Composed type representation for type RepositoryRuleCodeScanningable @@ -28,38 +20,14 @@ type RepositoryRule struct { repositoryRuleCreation RepositoryRuleCreationable // Composed type representation for type RepositoryRuleDeletionable repositoryRuleDeletion RepositoryRuleDeletionable - // Composed type representation for type File_extension_restrictionable - repositoryRuleFile_extension_restriction File_extension_restrictionable - // Composed type representation for type File_extension_restrictionable - repositoryRuleFile_extension_restriction0 File_extension_restrictionable - // Composed type representation for type File_extension_restrictionable - repositoryRuleFile_extension_restriction1 File_extension_restrictionable - // Composed type representation for type File_extension_restrictionable - repositoryRuleFile_extension_restriction2 File_extension_restrictionable - // Composed type representation for type File_path_restrictionable - repositoryRuleFile_path_restriction File_path_restrictionable - // Composed type representation for type File_path_restrictionable - repositoryRuleFile_path_restriction0 File_path_restrictionable - // Composed type representation for type File_path_restrictionable - repositoryRuleFile_path_restriction1 File_path_restrictionable - // Composed type representation for type File_path_restrictionable - repositoryRuleFile_path_restriction2 File_path_restrictionable - // Composed type representation for type Max_file_path_lengthable - repositoryRuleMax_file_path_length Max_file_path_lengthable - // Composed type representation for type Max_file_path_lengthable - repositoryRuleMax_file_path_length0 Max_file_path_lengthable - // Composed type representation for type Max_file_path_lengthable - repositoryRuleMax_file_path_length1 Max_file_path_lengthable - // Composed type representation for type Max_file_path_lengthable - repositoryRuleMax_file_path_length2 Max_file_path_lengthable - // Composed type representation for type Max_file_sizeable - repositoryRuleMax_file_size Max_file_sizeable - // Composed type representation for type Max_file_sizeable - repositoryRuleMax_file_size0 Max_file_sizeable - // Composed type representation for type Max_file_sizeable - repositoryRuleMax_file_size1 Max_file_sizeable - // Composed type representation for type Max_file_sizeable - repositoryRuleMax_file_size2 Max_file_sizeable + // Composed type representation for type RepositoryRuleMember1able + repositoryRuleMember1 RepositoryRuleMember1able + // Composed type representation for type RepositoryRuleMember2able + repositoryRuleMember2 RepositoryRuleMember2able + // Composed type representation for type RepositoryRuleMember3able + repositoryRuleMember3 RepositoryRuleMember3able + // Composed type representation for type RepositoryRuleMember4able + repositoryRuleMember4 RepositoryRuleMember4able // Composed type representation for type RepositoryRuleNonFastForwardable repositoryRuleNonFastForward RepositoryRuleNonFastForwardable // Composed type representation for type RepositoryRulePullRequestable @@ -120,6 +88,38 @@ type RepositoryRule struct { repositoryRuleRepositoryRuleDeletion1 RepositoryRuleDeletionable // Composed type representation for type RepositoryRuleDeletionable repositoryRuleRepositoryRuleDeletion2 RepositoryRuleDeletionable + // Composed type representation for type RepositoryRuleMember1able + repositoryRuleRepositoryRuleMember1 RepositoryRuleMember1able + // Composed type representation for type RepositoryRuleMember1able + repositoryRuleRepositoryRuleMember10 RepositoryRuleMember1able + // Composed type representation for type RepositoryRuleMember1able + repositoryRuleRepositoryRuleMember11 RepositoryRuleMember1able + // Composed type representation for type RepositoryRuleMember1able + repositoryRuleRepositoryRuleMember12 RepositoryRuleMember1able + // Composed type representation for type RepositoryRuleMember2able + repositoryRuleRepositoryRuleMember2 RepositoryRuleMember2able + // Composed type representation for type RepositoryRuleMember2able + repositoryRuleRepositoryRuleMember20 RepositoryRuleMember2able + // Composed type representation for type RepositoryRuleMember2able + repositoryRuleRepositoryRuleMember21 RepositoryRuleMember2able + // Composed type representation for type RepositoryRuleMember2able + repositoryRuleRepositoryRuleMember22 RepositoryRuleMember2able + // Composed type representation for type RepositoryRuleMember3able + repositoryRuleRepositoryRuleMember3 RepositoryRuleMember3able + // Composed type representation for type RepositoryRuleMember3able + repositoryRuleRepositoryRuleMember30 RepositoryRuleMember3able + // Composed type representation for type RepositoryRuleMember3able + repositoryRuleRepositoryRuleMember31 RepositoryRuleMember3able + // Composed type representation for type RepositoryRuleMember3able + repositoryRuleRepositoryRuleMember32 RepositoryRuleMember3able + // Composed type representation for type RepositoryRuleMember4able + repositoryRuleRepositoryRuleMember4 RepositoryRuleMember4able + // Composed type representation for type RepositoryRuleMember4able + repositoryRuleRepositoryRuleMember40 RepositoryRuleMember4able + // Composed type representation for type RepositoryRuleMember4able + repositoryRuleRepositoryRuleMember41 RepositoryRuleMember4able + // Composed type representation for type RepositoryRuleMember4able + repositoryRuleRepositoryRuleMember42 RepositoryRuleMember4able // Composed type representation for type RepositoryRuleNonFastForwardable repositoryRuleRepositoryRuleNonFastForward RepositoryRuleNonFastForwardable // Composed type representation for type RepositoryRuleNonFastForwardable @@ -238,31 +238,11 @@ func CreateRepositoryRuleFromDiscriminatorValue(parseNode i878a80d2330e89d268963 func (m *RepositoryRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } -// GetFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -// returns a File_extension_restrictionable when successful -func (m *RepositoryRule) GetFileExtensionRestriction()(File_extension_restrictionable) { - return m.file_extension_restriction -} -// GetFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -// returns a File_path_restrictionable when successful -func (m *RepositoryRule) GetFilePathRestriction()(File_path_restrictionable) { - return m.file_path_restriction -} // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful func (m *RepositoryRule) GetIsComposedType()(bool) { return true } -// GetMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -// returns a Max_file_path_lengthable when successful -func (m *RepositoryRule) GetMaxFilePathLength()(Max_file_path_lengthable) { - return m.max_file_path_length -} -// GetMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable -// returns a Max_file_sizeable when successful -func (m *RepositoryRule) GetMaxFileSize()(Max_file_sizeable) { - return m.max_file_size -} // GetRepositoryRuleBranchNamePattern gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable // returns a RepositoryRuleBranchNamePatternable when successful func (m *RepositoryRule) GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) { @@ -298,85 +278,25 @@ func (m *RepositoryRule) GetRepositoryRuleCreation()(RepositoryRuleCreationable) func (m *RepositoryRule) GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) { return m.repositoryRuleDeletion } -// GetRepositoryRuleFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -// returns a File_extension_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) { - return m.repositoryRuleFile_extension_restriction -} -// GetRepositoryRuleFileExtensionRestriction0 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -// returns a File_extension_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) { - return m.repositoryRuleFile_extension_restriction0 -} -// GetRepositoryRuleFileExtensionRestriction1 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -// returns a File_extension_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) { - return m.repositoryRuleFile_extension_restriction1 -} -// GetRepositoryRuleFileExtensionRestriction2 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -// returns a File_extension_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) { - return m.repositoryRuleFile_extension_restriction2 -} -// GetRepositoryRuleFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -// returns a File_path_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) { - return m.repositoryRuleFile_path_restriction -} -// GetRepositoryRuleFilePathRestriction0 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -// returns a File_path_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) { - return m.repositoryRuleFile_path_restriction0 -} -// GetRepositoryRuleFilePathRestriction1 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -// returns a File_path_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) { - return m.repositoryRuleFile_path_restriction1 -} -// GetRepositoryRuleFilePathRestriction2 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -// returns a File_path_restrictionable when successful -func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) { - return m.repositoryRuleFile_path_restriction2 -} -// GetRepositoryRuleMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -// returns a Max_file_path_lengthable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) { - return m.repositoryRuleMax_file_path_length -} -// GetRepositoryRuleMaxFilePathLength0 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -// returns a Max_file_path_lengthable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) { - return m.repositoryRuleMax_file_path_length0 -} -// GetRepositoryRuleMaxFilePathLength1 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -// returns a Max_file_path_lengthable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) { - return m.repositoryRuleMax_file_path_length1 -} -// GetRepositoryRuleMaxFilePathLength2 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -// returns a Max_file_path_lengthable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) { - return m.repositoryRuleMax_file_path_length2 -} -// GetRepositoryRuleMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable -// returns a Max_file_sizeable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFileSize()(Max_file_sizeable) { - return m.repositoryRuleMax_file_size -} -// GetRepositoryRuleMaxFileSize0 gets the max_file_size property value. Composed type representation for type Max_file_sizeable -// returns a Max_file_sizeable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) { - return m.repositoryRuleMax_file_size0 -} -// GetRepositoryRuleMaxFileSize1 gets the max_file_size property value. Composed type representation for type Max_file_sizeable -// returns a Max_file_sizeable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) { - return m.repositoryRuleMax_file_size1 -} -// GetRepositoryRuleMaxFileSize2 gets the max_file_size property value. Composed type representation for type Max_file_sizeable -// returns a Max_file_sizeable when successful -func (m *RepositoryRule) GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) { - return m.repositoryRuleMax_file_size2 +// GetRepositoryRuleMember1 gets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +// returns a RepositoryRuleMember1able when successful +func (m *RepositoryRule) GetRepositoryRuleMember1()(RepositoryRuleMember1able) { + return m.repositoryRuleMember1 +} +// GetRepositoryRuleMember2 gets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +// returns a RepositoryRuleMember2able when successful +func (m *RepositoryRule) GetRepositoryRuleMember2()(RepositoryRuleMember2able) { + return m.repositoryRuleMember2 +} +// GetRepositoryRuleMember3 gets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +// returns a RepositoryRuleMember3able when successful +func (m *RepositoryRule) GetRepositoryRuleMember3()(RepositoryRuleMember3able) { + return m.repositoryRuleMember3 +} +// GetRepositoryRuleMember4 gets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +// returns a RepositoryRuleMember4able when successful +func (m *RepositoryRule) GetRepositoryRuleMember4()(RepositoryRuleMember4able) { + return m.repositoryRuleMember4 } // GetRepositoryRuleNonFastForward gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable // returns a RepositoryRuleNonFastForwardable when successful @@ -528,6 +448,86 @@ func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion1()(RepositoryRu func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleDeletion2()(RepositoryRuleDeletionable) { return m.repositoryRuleRepositoryRuleDeletion2 } +// GetRepositoryRuleRepositoryRuleMember1 gets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +// returns a RepositoryRuleMember1able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember1()(RepositoryRuleMember1able) { + return m.repositoryRuleRepositoryRuleMember1 +} +// GetRepositoryRuleRepositoryRuleMember10 gets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +// returns a RepositoryRuleMember1able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember10()(RepositoryRuleMember1able) { + return m.repositoryRuleRepositoryRuleMember10 +} +// GetRepositoryRuleRepositoryRuleMember11 gets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +// returns a RepositoryRuleMember1able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember11()(RepositoryRuleMember1able) { + return m.repositoryRuleRepositoryRuleMember11 +} +// GetRepositoryRuleRepositoryRuleMember12 gets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +// returns a RepositoryRuleMember1able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember12()(RepositoryRuleMember1able) { + return m.repositoryRuleRepositoryRuleMember12 +} +// GetRepositoryRuleRepositoryRuleMember2 gets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +// returns a RepositoryRuleMember2able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember2()(RepositoryRuleMember2able) { + return m.repositoryRuleRepositoryRuleMember2 +} +// GetRepositoryRuleRepositoryRuleMember20 gets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +// returns a RepositoryRuleMember2able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember20()(RepositoryRuleMember2able) { + return m.repositoryRuleRepositoryRuleMember20 +} +// GetRepositoryRuleRepositoryRuleMember21 gets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +// returns a RepositoryRuleMember2able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember21()(RepositoryRuleMember2able) { + return m.repositoryRuleRepositoryRuleMember21 +} +// GetRepositoryRuleRepositoryRuleMember22 gets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +// returns a RepositoryRuleMember2able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember22()(RepositoryRuleMember2able) { + return m.repositoryRuleRepositoryRuleMember22 +} +// GetRepositoryRuleRepositoryRuleMember3 gets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +// returns a RepositoryRuleMember3able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember3()(RepositoryRuleMember3able) { + return m.repositoryRuleRepositoryRuleMember3 +} +// GetRepositoryRuleRepositoryRuleMember30 gets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +// returns a RepositoryRuleMember3able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember30()(RepositoryRuleMember3able) { + return m.repositoryRuleRepositoryRuleMember30 +} +// GetRepositoryRuleRepositoryRuleMember31 gets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +// returns a RepositoryRuleMember3able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember31()(RepositoryRuleMember3able) { + return m.repositoryRuleRepositoryRuleMember31 +} +// GetRepositoryRuleRepositoryRuleMember32 gets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +// returns a RepositoryRuleMember3able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember32()(RepositoryRuleMember3able) { + return m.repositoryRuleRepositoryRuleMember32 +} +// GetRepositoryRuleRepositoryRuleMember4 gets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +// returns a RepositoryRuleMember4able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember4()(RepositoryRuleMember4able) { + return m.repositoryRuleRepositoryRuleMember4 +} +// GetRepositoryRuleRepositoryRuleMember40 gets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +// returns a RepositoryRuleMember4able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember40()(RepositoryRuleMember4able) { + return m.repositoryRuleRepositoryRuleMember40 +} +// GetRepositoryRuleRepositoryRuleMember41 gets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +// returns a RepositoryRuleMember4able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember41()(RepositoryRuleMember4able) { + return m.repositoryRuleRepositoryRuleMember41 +} +// GetRepositoryRuleRepositoryRuleMember42 gets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +// returns a RepositoryRuleMember4able when successful +func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleMember42()(RepositoryRuleMember4able) { + return m.repositoryRuleRepositoryRuleMember42 +} // GetRepositoryRuleRepositoryRuleNonFastForward gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable // returns a RepositoryRuleNonFastForwardable when successful func (m *RepositoryRule) GetRepositoryRuleRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) { @@ -745,27 +745,7 @@ func (m *RepositoryRule) GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsabl } // Serialize serializes information the current object func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetFileExtensionRestriction() != nil { - err := writer.WriteObjectValue("", m.GetFileExtensionRestriction()) - if err != nil { - return err - } - } else if m.GetFilePathRestriction() != nil { - err := writer.WriteObjectValue("", m.GetFilePathRestriction()) - if err != nil { - return err - } - } else if m.GetMaxFilePathLength() != nil { - err := writer.WriteObjectValue("", m.GetMaxFilePathLength()) - if err != nil { - return err - } - } else if m.GetMaxFileSize() != nil { - err := writer.WriteObjectValue("", m.GetMaxFileSize()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleBranchNamePattern() != nil { + if m.GetRepositoryRuleBranchNamePattern() != nil { err := writer.WriteObjectValue("", m.GetRepositoryRuleBranchNamePattern()) if err != nil { return err @@ -800,83 +780,23 @@ func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a if err != nil { return err } - } else if m.GetRepositoryRuleFileExtensionRestriction() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFileExtensionRestriction0() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction0()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFileExtensionRestriction1() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction1()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFileExtensionRestriction2() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction2()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFilePathRestriction() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFilePathRestriction0() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction0()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFilePathRestriction1() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction1()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleFilePathRestriction2() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction2()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleMaxFilePathLength() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleMaxFilePathLength0() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength0()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleMaxFilePathLength1() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength1()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleMaxFilePathLength2() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength2()) - if err != nil { - return err - } - } else if m.GetRepositoryRuleMaxFileSize() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize()) + } else if m.GetRepositoryRuleMember1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMember1()) if err != nil { return err } - } else if m.GetRepositoryRuleMaxFileSize0() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize0()) + } else if m.GetRepositoryRuleMember2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMember2()) if err != nil { return err } - } else if m.GetRepositoryRuleMaxFileSize1() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize1()) + } else if m.GetRepositoryRuleMember3() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMember3()) if err != nil { return err } - } else if m.GetRepositoryRuleMaxFileSize2() != nil { - err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize2()) + } else if m.GetRepositoryRuleMember4() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMember4()) if err != nil { return err } @@ -1030,6 +950,86 @@ func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a if err != nil { return err } + } else if m.GetRepositoryRuleRepositoryRuleMember1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember10() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember10()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember11() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember11()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember12() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember12()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember20() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember20()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember21() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember21()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember22() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember22()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember3() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember3()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember30() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember30()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember31() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember31()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember32() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember32()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember4() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember4()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember40() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember40()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember41() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember41()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleRepositoryRuleMember42() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleMember42()) + if err != nil { + return err + } } else if m.GetRepositoryRuleRepositoryRuleNonFastForward() != nil { err := writer.WriteObjectValue("", m.GetRepositoryRuleRepositoryRuleNonFastForward()) if err != nil { @@ -1248,22 +1248,6 @@ func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a } return nil } -// SetFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -func (m *RepositoryRule) SetFileExtensionRestriction(value File_extension_restrictionable)() { - m.file_extension_restriction = value -} -// SetFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -func (m *RepositoryRule) SetFilePathRestriction(value File_path_restrictionable)() { - m.file_path_restriction = value -} -// SetMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -func (m *RepositoryRule) SetMaxFilePathLength(value Max_file_path_lengthable)() { - m.max_file_path_length = value -} -// SetMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable -func (m *RepositoryRule) SetMaxFileSize(value Max_file_sizeable)() { - m.max_file_size = value -} // SetRepositoryRuleBranchNamePattern sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable func (m *RepositoryRule) SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() { m.repositoryRuleBranchNamePattern = value @@ -1292,69 +1276,21 @@ func (m *RepositoryRule) SetRepositoryRuleCreation(value RepositoryRuleCreationa func (m *RepositoryRule) SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() { m.repositoryRuleDeletion = value } -// SetRepositoryRuleFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() { - m.repositoryRuleFile_extension_restriction = value -} -// SetRepositoryRuleFileExtensionRestriction0 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() { - m.repositoryRuleFile_extension_restriction0 = value -} -// SetRepositoryRuleFileExtensionRestriction1 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() { - m.repositoryRuleFile_extension_restriction1 = value -} -// SetRepositoryRuleFileExtensionRestriction2 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() { - m.repositoryRuleFile_extension_restriction2 = value -} -// SetRepositoryRuleFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() { - m.repositoryRuleFile_path_restriction = value -} -// SetRepositoryRuleFilePathRestriction0 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() { - m.repositoryRuleFile_path_restriction0 = value -} -// SetRepositoryRuleFilePathRestriction1 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() { - m.repositoryRuleFile_path_restriction1 = value -} -// SetRepositoryRuleFilePathRestriction2 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable -func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() { - m.repositoryRuleFile_path_restriction2 = value -} -// SetRepositoryRuleMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() { - m.repositoryRuleMax_file_path_length = value -} -// SetRepositoryRuleMaxFilePathLength0 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() { - m.repositoryRuleMax_file_path_length0 = value -} -// SetRepositoryRuleMaxFilePathLength1 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() { - m.repositoryRuleMax_file_path_length1 = value -} -// SetRepositoryRuleMaxFilePathLength2 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable -func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() { - m.repositoryRuleMax_file_path_length2 = value +// SetRepositoryRuleMember1 sets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +func (m *RepositoryRule) SetRepositoryRuleMember1(value RepositoryRuleMember1able)() { + m.repositoryRuleMember1 = value } -// SetRepositoryRuleMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable -func (m *RepositoryRule) SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() { - m.repositoryRuleMax_file_size = value +// SetRepositoryRuleMember2 sets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +func (m *RepositoryRule) SetRepositoryRuleMember2(value RepositoryRuleMember2able)() { + m.repositoryRuleMember2 = value } -// SetRepositoryRuleMaxFileSize0 sets the max_file_size property value. Composed type representation for type Max_file_sizeable -func (m *RepositoryRule) SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() { - m.repositoryRuleMax_file_size0 = value +// SetRepositoryRuleMember3 sets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +func (m *RepositoryRule) SetRepositoryRuleMember3(value RepositoryRuleMember3able)() { + m.repositoryRuleMember3 = value } -// SetRepositoryRuleMaxFileSize1 sets the max_file_size property value. Composed type representation for type Max_file_sizeable -func (m *RepositoryRule) SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() { - m.repositoryRuleMax_file_size1 = value -} -// SetRepositoryRuleMaxFileSize2 sets the max_file_size property value. Composed type representation for type Max_file_sizeable -func (m *RepositoryRule) SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() { - m.repositoryRuleMax_file_size2 = value +// SetRepositoryRuleMember4 sets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +func (m *RepositoryRule) SetRepositoryRuleMember4(value RepositoryRuleMember4able)() { + m.repositoryRuleMember4 = value } // SetRepositoryRuleNonFastForward sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable func (m *RepositoryRule) SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() { @@ -1476,6 +1412,70 @@ func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion1(value Reposito func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleDeletion2(value RepositoryRuleDeletionable)() { m.repositoryRuleRepositoryRuleDeletion2 = value } +// SetRepositoryRuleRepositoryRuleMember1 sets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember1(value RepositoryRuleMember1able)() { + m.repositoryRuleRepositoryRuleMember1 = value +} +// SetRepositoryRuleRepositoryRuleMember10 sets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember10(value RepositoryRuleMember1able)() { + m.repositoryRuleRepositoryRuleMember10 = value +} +// SetRepositoryRuleRepositoryRuleMember11 sets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember11(value RepositoryRuleMember1able)() { + m.repositoryRuleRepositoryRuleMember11 = value +} +// SetRepositoryRuleRepositoryRuleMember12 sets the repositoryRuleMember1 property value. Composed type representation for type RepositoryRuleMember1able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember12(value RepositoryRuleMember1able)() { + m.repositoryRuleRepositoryRuleMember12 = value +} +// SetRepositoryRuleRepositoryRuleMember2 sets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember2(value RepositoryRuleMember2able)() { + m.repositoryRuleRepositoryRuleMember2 = value +} +// SetRepositoryRuleRepositoryRuleMember20 sets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember20(value RepositoryRuleMember2able)() { + m.repositoryRuleRepositoryRuleMember20 = value +} +// SetRepositoryRuleRepositoryRuleMember21 sets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember21(value RepositoryRuleMember2able)() { + m.repositoryRuleRepositoryRuleMember21 = value +} +// SetRepositoryRuleRepositoryRuleMember22 sets the repositoryRuleMember2 property value. Composed type representation for type RepositoryRuleMember2able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember22(value RepositoryRuleMember2able)() { + m.repositoryRuleRepositoryRuleMember22 = value +} +// SetRepositoryRuleRepositoryRuleMember3 sets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember3(value RepositoryRuleMember3able)() { + m.repositoryRuleRepositoryRuleMember3 = value +} +// SetRepositoryRuleRepositoryRuleMember30 sets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember30(value RepositoryRuleMember3able)() { + m.repositoryRuleRepositoryRuleMember30 = value +} +// SetRepositoryRuleRepositoryRuleMember31 sets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember31(value RepositoryRuleMember3able)() { + m.repositoryRuleRepositoryRuleMember31 = value +} +// SetRepositoryRuleRepositoryRuleMember32 sets the repositoryRuleMember3 property value. Composed type representation for type RepositoryRuleMember3able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember32(value RepositoryRuleMember3able)() { + m.repositoryRuleRepositoryRuleMember32 = value +} +// SetRepositoryRuleRepositoryRuleMember4 sets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember4(value RepositoryRuleMember4able)() { + m.repositoryRuleRepositoryRuleMember4 = value +} +// SetRepositoryRuleRepositoryRuleMember40 sets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember40(value RepositoryRuleMember4able)() { + m.repositoryRuleRepositoryRuleMember40 = value +} +// SetRepositoryRuleRepositoryRuleMember41 sets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember41(value RepositoryRuleMember4able)() { + m.repositoryRuleRepositoryRuleMember41 = value +} +// SetRepositoryRuleRepositoryRuleMember42 sets the repositoryRuleMember4 property value. Composed type representation for type RepositoryRuleMember4able +func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleMember42(value RepositoryRuleMember4able)() { + m.repositoryRuleRepositoryRuleMember42 = value +} // SetRepositoryRuleRepositoryRuleNonFastForward sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable func (m *RepositoryRule) SetRepositoryRuleRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() { m.repositoryRuleRepositoryRuleNonFastForward = value @@ -1650,10 +1650,6 @@ func (m *RepositoryRule) SetRepositoryRuleWorkflows(value RepositoryRuleWorkflow } type RepositoryRuleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetFileExtensionRestriction()(File_extension_restrictionable) - GetFilePathRestriction()(File_path_restrictionable) - GetMaxFilePathLength()(Max_file_path_lengthable) - GetMaxFileSize()(Max_file_sizeable) GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) GetRepositoryRuleCodeScanning()(RepositoryRuleCodeScanningable) GetRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) @@ -1661,22 +1657,10 @@ type RepositoryRuleable interface { GetRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) GetRepositoryRuleCreation()(RepositoryRuleCreationable) GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) - GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) - GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) - GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) - GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) - GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) - GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) - GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) - GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) - GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) - GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) - GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) - GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) - GetRepositoryRuleMaxFileSize()(Max_file_sizeable) - GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) - GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) - GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) + GetRepositoryRuleMember1()(RepositoryRuleMember1able) + GetRepositoryRuleMember2()(RepositoryRuleMember2able) + GetRepositoryRuleMember3()(RepositoryRuleMember3able) + GetRepositoryRuleMember4()(RepositoryRuleMember4able) GetRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) GetRepositoryRulePullRequest()(RepositoryRulePullRequestable) GetRepositoryRuleRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) @@ -1707,6 +1691,22 @@ type RepositoryRuleable interface { GetRepositoryRuleRepositoryRuleDeletion0()(RepositoryRuleDeletionable) GetRepositoryRuleRepositoryRuleDeletion1()(RepositoryRuleDeletionable) GetRepositoryRuleRepositoryRuleDeletion2()(RepositoryRuleDeletionable) + GetRepositoryRuleRepositoryRuleMember1()(RepositoryRuleMember1able) + GetRepositoryRuleRepositoryRuleMember10()(RepositoryRuleMember1able) + GetRepositoryRuleRepositoryRuleMember11()(RepositoryRuleMember1able) + GetRepositoryRuleRepositoryRuleMember12()(RepositoryRuleMember1able) + GetRepositoryRuleRepositoryRuleMember2()(RepositoryRuleMember2able) + GetRepositoryRuleRepositoryRuleMember20()(RepositoryRuleMember2able) + GetRepositoryRuleRepositoryRuleMember21()(RepositoryRuleMember2able) + GetRepositoryRuleRepositoryRuleMember22()(RepositoryRuleMember2able) + GetRepositoryRuleRepositoryRuleMember3()(RepositoryRuleMember3able) + GetRepositoryRuleRepositoryRuleMember30()(RepositoryRuleMember3able) + GetRepositoryRuleRepositoryRuleMember31()(RepositoryRuleMember3able) + GetRepositoryRuleRepositoryRuleMember32()(RepositoryRuleMember3able) + GetRepositoryRuleRepositoryRuleMember4()(RepositoryRuleMember4able) + GetRepositoryRuleRepositoryRuleMember40()(RepositoryRuleMember4able) + GetRepositoryRuleRepositoryRuleMember41()(RepositoryRuleMember4able) + GetRepositoryRuleRepositoryRuleMember42()(RepositoryRuleMember4able) GetRepositoryRuleRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) GetRepositoryRuleRepositoryRuleNonFastForward0()(RepositoryRuleNonFastForwardable) GetRepositoryRuleRepositoryRuleNonFastForward1()(RepositoryRuleNonFastForwardable) @@ -1750,10 +1750,6 @@ type RepositoryRuleable interface { GetRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) GetRepositoryRuleUpdate()(RepositoryRuleUpdateable) GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) - SetFileExtensionRestriction(value File_extension_restrictionable)() - SetFilePathRestriction(value File_path_restrictionable)() - SetMaxFilePathLength(value Max_file_path_lengthable)() - SetMaxFileSize(value Max_file_sizeable)() SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() SetRepositoryRuleCodeScanning(value RepositoryRuleCodeScanningable)() SetRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() @@ -1761,22 +1757,10 @@ type RepositoryRuleable interface { SetRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() SetRepositoryRuleCreation(value RepositoryRuleCreationable)() SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() - SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() - SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() - SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() - SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() - SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() - SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() - SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() - SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() - SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() - SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() - SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() - SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() - SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() - SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() - SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() - SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() + SetRepositoryRuleMember1(value RepositoryRuleMember1able)() + SetRepositoryRuleMember2(value RepositoryRuleMember2able)() + SetRepositoryRuleMember3(value RepositoryRuleMember3able)() + SetRepositoryRuleMember4(value RepositoryRuleMember4able)() SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() SetRepositoryRulePullRequest(value RepositoryRulePullRequestable)() SetRepositoryRuleRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() @@ -1807,6 +1791,22 @@ type RepositoryRuleable interface { SetRepositoryRuleRepositoryRuleDeletion0(value RepositoryRuleDeletionable)() SetRepositoryRuleRepositoryRuleDeletion1(value RepositoryRuleDeletionable)() SetRepositoryRuleRepositoryRuleDeletion2(value RepositoryRuleDeletionable)() + SetRepositoryRuleRepositoryRuleMember1(value RepositoryRuleMember1able)() + SetRepositoryRuleRepositoryRuleMember10(value RepositoryRuleMember1able)() + SetRepositoryRuleRepositoryRuleMember11(value RepositoryRuleMember1able)() + SetRepositoryRuleRepositoryRuleMember12(value RepositoryRuleMember1able)() + SetRepositoryRuleRepositoryRuleMember2(value RepositoryRuleMember2able)() + SetRepositoryRuleRepositoryRuleMember20(value RepositoryRuleMember2able)() + SetRepositoryRuleRepositoryRuleMember21(value RepositoryRuleMember2able)() + SetRepositoryRuleRepositoryRuleMember22(value RepositoryRuleMember2able)() + SetRepositoryRuleRepositoryRuleMember3(value RepositoryRuleMember3able)() + SetRepositoryRuleRepositoryRuleMember30(value RepositoryRuleMember3able)() + SetRepositoryRuleRepositoryRuleMember31(value RepositoryRuleMember3able)() + SetRepositoryRuleRepositoryRuleMember32(value RepositoryRuleMember3able)() + SetRepositoryRuleRepositoryRuleMember4(value RepositoryRuleMember4able)() + SetRepositoryRuleRepositoryRuleMember40(value RepositoryRuleMember4able)() + SetRepositoryRuleRepositoryRuleMember41(value RepositoryRuleMember4able)() + SetRepositoryRuleRepositoryRuleMember42(value RepositoryRuleMember4able)() SetRepositoryRuleRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() SetRepositoryRuleRepositoryRuleNonFastForward0(value RepositoryRuleNonFastForwardable)() SetRepositoryRuleRepositoryRuleNonFastForward1(value RepositoryRuleNonFastForwardable)() diff --git a/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go b/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go index d192b706..e4706d19 100644 --- a/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go +++ b/pkg/github/models/repository_rule_branch_name_pattern_parameters_operator.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The operator to use for matching. type RepositoryRuleBranchNamePattern_parameters_operator int @@ -27,7 +24,7 @@ func ParseRepositoryRuleBranchNamePattern_parameters_operator(v string) (any, er case "regex": result = REGEX_REPOSITORYRULEBRANCHNAMEPATTERN_PARAMETERS_OPERATOR default: - return 0, errors.New("Unknown RepositoryRuleBranchNamePattern_parameters_operator value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_branch_name_pattern_type.go b/pkg/github/models/repository_rule_branch_name_pattern_type.go index 0fce8bf1..77546287 100644 --- a/pkg/github/models/repository_rule_branch_name_pattern_type.go +++ b/pkg/github/models/repository_rule_branch_name_pattern_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleBranchNamePattern_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleBranchNamePattern_type(v string) (any, error) { case "branch_name_pattern": result = BRANCH_NAME_PATTERN_REPOSITORYRULEBRANCHNAMEPATTERN_TYPE default: - return 0, errors.New("Unknown RepositoryRuleBranchNamePattern_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_code_scanning_type.go b/pkg/github/models/repository_rule_code_scanning_type.go index 47648a5c..dc5b7cf5 100644 --- a/pkg/github/models/repository_rule_code_scanning_type.go +++ b/pkg/github/models/repository_rule_code_scanning_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleCodeScanning_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleCodeScanning_type(v string) (any, error) { case "code_scanning": result = CODE_SCANNING_REPOSITORYRULECODESCANNING_TYPE default: - return 0, errors.New("Unknown RepositoryRuleCodeScanning_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go index 85c4203f..ca107f96 100644 --- a/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go +++ b/pkg/github/models/repository_rule_commit_author_email_pattern_parameters_operator.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The operator to use for matching. type RepositoryRuleCommitAuthorEmailPattern_parameters_operator int @@ -27,7 +24,7 @@ func ParseRepositoryRuleCommitAuthorEmailPattern_parameters_operator(v string) ( case "regex": result = REGEX_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_PARAMETERS_OPERATOR default: - return 0, errors.New("Unknown RepositoryRuleCommitAuthorEmailPattern_parameters_operator value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_commit_author_email_pattern_type.go b/pkg/github/models/repository_rule_commit_author_email_pattern_type.go index 1be3b2e8..17da5735 100644 --- a/pkg/github/models/repository_rule_commit_author_email_pattern_type.go +++ b/pkg/github/models/repository_rule_commit_author_email_pattern_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleCommitAuthorEmailPattern_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleCommitAuthorEmailPattern_type(v string) (any, error) { case "commit_author_email_pattern": result = COMMIT_AUTHOR_EMAIL_PATTERN_REPOSITORYRULECOMMITAUTHOREMAILPATTERN_TYPE default: - return 0, errors.New("Unknown RepositoryRuleCommitAuthorEmailPattern_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go b/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go index e310dd2c..54c8690f 100644 --- a/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go +++ b/pkg/github/models/repository_rule_commit_message_pattern_parameters_operator.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The operator to use for matching. type RepositoryRuleCommitMessagePattern_parameters_operator int @@ -27,7 +24,7 @@ func ParseRepositoryRuleCommitMessagePattern_parameters_operator(v string) (any, case "regex": result = REGEX_REPOSITORYRULECOMMITMESSAGEPATTERN_PARAMETERS_OPERATOR default: - return 0, errors.New("Unknown RepositoryRuleCommitMessagePattern_parameters_operator value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_commit_message_pattern_type.go b/pkg/github/models/repository_rule_commit_message_pattern_type.go index 8282213a..d9f33fc9 100644 --- a/pkg/github/models/repository_rule_commit_message_pattern_type.go +++ b/pkg/github/models/repository_rule_commit_message_pattern_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleCommitMessagePattern_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleCommitMessagePattern_type(v string) (any, error) { case "commit_message_pattern": result = COMMIT_MESSAGE_PATTERN_REPOSITORYRULECOMMITMESSAGEPATTERN_TYPE default: - return 0, errors.New("Unknown RepositoryRuleCommitMessagePattern_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go b/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go index a722fafb..c7f94eb6 100644 --- a/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go +++ b/pkg/github/models/repository_rule_committer_email_pattern_parameters_operator.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The operator to use for matching. type RepositoryRuleCommitterEmailPattern_parameters_operator int @@ -27,7 +24,7 @@ func ParseRepositoryRuleCommitterEmailPattern_parameters_operator(v string) (any case "regex": result = REGEX_REPOSITORYRULECOMMITTEREMAILPATTERN_PARAMETERS_OPERATOR default: - return 0, errors.New("Unknown RepositoryRuleCommitterEmailPattern_parameters_operator value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_committer_email_pattern_type.go b/pkg/github/models/repository_rule_committer_email_pattern_type.go index 13b74882..c341e17f 100644 --- a/pkg/github/models/repository_rule_committer_email_pattern_type.go +++ b/pkg/github/models/repository_rule_committer_email_pattern_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleCommitterEmailPattern_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleCommitterEmailPattern_type(v string) (any, error) { case "committer_email_pattern": result = COMMITTER_EMAIL_PATTERN_REPOSITORYRULECOMMITTEREMAILPATTERN_TYPE default: - return 0, errors.New("Unknown RepositoryRuleCommitterEmailPattern_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_creation_type.go b/pkg/github/models/repository_rule_creation_type.go index 830e8d04..67c4bec9 100644 --- a/pkg/github/models/repository_rule_creation_type.go +++ b/pkg/github/models/repository_rule_creation_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleCreation_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleCreation_type(v string) (any, error) { case "creation": result = CREATION_REPOSITORYRULECREATION_TYPE default: - return 0, errors.New("Unknown RepositoryRuleCreation_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_deletion_type.go b/pkg/github/models/repository_rule_deletion_type.go index 77cb2c70..541bd6d2 100644 --- a/pkg/github/models/repository_rule_deletion_type.go +++ b/pkg/github/models/repository_rule_deletion_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleDeletion_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleDeletion_type(v string) (any, error) { case "deletion": result = DELETION_REPOSITORYRULEDELETION_TYPE default: - return 0, errors.New("Unknown RepositoryRuleDeletion_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_enforcement.go b/pkg/github/models/repository_rule_enforcement.go index c3c88567..273b370f 100644 --- a/pkg/github/models/repository_rule_enforcement.go +++ b/pkg/github/models/repository_rule_enforcement.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // 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 only available with GitHub Enterprise). type RepositoryRuleEnforcement int @@ -24,7 +21,7 @@ func ParseRepositoryRuleEnforcement(v string) (any, error) { case "evaluate": result = EVALUATE_REPOSITORYRULEENFORCEMENT default: - return 0, errors.New("Unknown RepositoryRuleEnforcement value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_member1.go b/pkg/github/models/repository_rule_member1.go new file mode 100644 index 00000000..4977bf22 --- /dev/null +++ b/pkg/github/models/repository_rule_member1.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleMember1 note: file_path_restriction is in beta and subject to change.Prevent commits that include changes in specified file paths from being pushed to the commit graph. +type RepositoryRuleMember1 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 parameters property + parameters RepositoryRuleMember1_parametersable + // The type property + typeEscaped *RepositoryRuleMember1_type +} +// NewRepositoryRuleMember1 instantiates a new RepositoryRuleMember1 and sets the default values. +func NewRepositoryRuleMember1()(*RepositoryRuleMember1) { + m := &RepositoryRuleMember1{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember1(), 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 *RepositoryRuleMember1) 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 *RepositoryRuleMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleMember1_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleMember1_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleMember1_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleMember1_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleMember1_parametersable when successful +func (m *RepositoryRuleMember1) GetParameters()(RepositoryRuleMember1_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleMember1_type when successful +func (m *RepositoryRuleMember1) GetTypeEscaped()(*RepositoryRuleMember1_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("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 *RepositoryRuleMember1) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleMember1) SetParameters(value RepositoryRuleMember1_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleMember1) SetTypeEscaped(value *RepositoryRuleMember1_type)() { + m.typeEscaped = value +} +type RepositoryRuleMember1able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleMember1_parametersable) + GetTypeEscaped()(*RepositoryRuleMember1_type) + SetParameters(value RepositoryRuleMember1_parametersable)() + SetTypeEscaped(value *RepositoryRuleMember1_type)() +} diff --git a/pkg/github/models/repository_rule_member1_parameters.go b/pkg/github/models/repository_rule_member1_parameters.go new file mode 100644 index 00000000..c65c28d8 --- /dev/null +++ b/pkg/github/models/repository_rule_member1_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleMember1_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 + // The file paths that are restricted from being pushed to the commit graph. + restricted_file_paths []string +} +// NewRepositoryRuleMember1_parameters instantiates a new RepositoryRuleMember1_parameters and sets the default values. +func NewRepositoryRuleMember1_parameters()(*RepositoryRuleMember1_parameters) { + m := &RepositoryRuleMember1_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember1_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember1_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember1_parameters(), 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 *RepositoryRuleMember1_parameters) 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 *RepositoryRuleMember1_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["restricted_file_paths"] = 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.SetRestrictedFilePaths(res) + } + return nil + } + return res +} +// GetRestrictedFilePaths gets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +// returns a []string when successful +func (m *RepositoryRuleMember1_parameters) GetRestrictedFilePaths()([]string) { + return m.restricted_file_paths +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember1_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRestrictedFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("restricted_file_paths", m.GetRestrictedFilePaths()) + 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 *RepositoryRuleMember1_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRestrictedFilePaths sets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +func (m *RepositoryRuleMember1_parameters) SetRestrictedFilePaths(value []string)() { + m.restricted_file_paths = value +} +type RepositoryRuleMember1_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRestrictedFilePaths()([]string) + SetRestrictedFilePaths(value []string)() +} diff --git a/pkg/github/models/repository_rule_member1_type.go b/pkg/github/models/repository_rule_member1_type.go new file mode 100644 index 00000000..039bd412 --- /dev/null +++ b/pkg/github/models/repository_rule_member1_type.go @@ -0,0 +1,30 @@ +package models +type RepositoryRuleMember1_type int + +const ( + FILE_PATH_RESTRICTION_REPOSITORYRULEMEMBER1_TYPE RepositoryRuleMember1_type = iota +) + +func (i RepositoryRuleMember1_type) String() string { + return []string{"file_path_restriction"}[i] +} +func ParseRepositoryRuleMember1_type(v string) (any, error) { + result := FILE_PATH_RESTRICTION_REPOSITORYRULEMEMBER1_TYPE + switch v { + case "file_path_restriction": + result = FILE_PATH_RESTRICTION_REPOSITORYRULEMEMBER1_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeRepositoryRuleMember1_type(values []RepositoryRuleMember1_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleMember1_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_member2.go b/pkg/github/models/repository_rule_member2.go new file mode 100644 index 00000000..111eaa5c --- /dev/null +++ b/pkg/github/models/repository_rule_member2.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleMember2 note: max_file_path_length is in beta and subject to change.Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. +type RepositoryRuleMember2 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 parameters property + parameters RepositoryRuleMember2_parametersable + // The type property + typeEscaped *RepositoryRuleMember2_type +} +// NewRepositoryRuleMember2 instantiates a new RepositoryRuleMember2 and sets the default values. +func NewRepositoryRuleMember2()(*RepositoryRuleMember2) { + m := &RepositoryRuleMember2{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember2(), 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 *RepositoryRuleMember2) 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 *RepositoryRuleMember2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleMember2_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleMember2_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleMember2_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleMember2_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleMember2_parametersable when successful +func (m *RepositoryRuleMember2) GetParameters()(RepositoryRuleMember2_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleMember2_type when successful +func (m *RepositoryRuleMember2) GetTypeEscaped()(*RepositoryRuleMember2_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("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 *RepositoryRuleMember2) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleMember2) SetParameters(value RepositoryRuleMember2_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleMember2) SetTypeEscaped(value *RepositoryRuleMember2_type)() { + m.typeEscaped = value +} +type RepositoryRuleMember2able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleMember2_parametersable) + GetTypeEscaped()(*RepositoryRuleMember2_type) + SetParameters(value RepositoryRuleMember2_parametersable)() + SetTypeEscaped(value *RepositoryRuleMember2_type)() +} diff --git a/pkg/github/models/repository_rule_member2_parameters.go b/pkg/github/models/repository_rule_member2_parameters.go new file mode 100644 index 00000000..5eb04c8d --- /dev/null +++ b/pkg/github/models/repository_rule_member2_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleMember2_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 + // The maximum amount of characters allowed in file paths + max_file_path_length *int32 +} +// NewRepositoryRuleMember2_parameters instantiates a new RepositoryRuleMember2_parameters and sets the default values. +func NewRepositoryRuleMember2_parameters()(*RepositoryRuleMember2_parameters) { + m := &RepositoryRuleMember2_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember2_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember2_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember2_parameters(), 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 *RepositoryRuleMember2_parameters) 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 *RepositoryRuleMember2_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_path_length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFilePathLength(val) + } + return nil + } + return res +} +// GetMaxFilePathLength gets the max_file_path_length property value. The maximum amount of characters allowed in file paths +// returns a *int32 when successful +func (m *RepositoryRuleMember2_parameters) GetMaxFilePathLength()(*int32) { + return m.max_file_path_length +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember2_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_path_length", m.GetMaxFilePathLength()) + 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 *RepositoryRuleMember2_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFilePathLength sets the max_file_path_length property value. The maximum amount of characters allowed in file paths +func (m *RepositoryRuleMember2_parameters) SetMaxFilePathLength(value *int32)() { + m.max_file_path_length = value +} +type RepositoryRuleMember2_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFilePathLength()(*int32) + SetMaxFilePathLength(value *int32)() +} diff --git a/pkg/github/models/repository_rule_member2_type.go b/pkg/github/models/repository_rule_member2_type.go new file mode 100644 index 00000000..5d7aa03f --- /dev/null +++ b/pkg/github/models/repository_rule_member2_type.go @@ -0,0 +1,30 @@ +package models +type RepositoryRuleMember2_type int + +const ( + MAX_FILE_PATH_LENGTH_REPOSITORYRULEMEMBER2_TYPE RepositoryRuleMember2_type = iota +) + +func (i RepositoryRuleMember2_type) String() string { + return []string{"max_file_path_length"}[i] +} +func ParseRepositoryRuleMember2_type(v string) (any, error) { + result := MAX_FILE_PATH_LENGTH_REPOSITORYRULEMEMBER2_TYPE + switch v { + case "max_file_path_length": + result = MAX_FILE_PATH_LENGTH_REPOSITORYRULEMEMBER2_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeRepositoryRuleMember2_type(values []RepositoryRuleMember2_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleMember2_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_member3.go b/pkg/github/models/repository_rule_member3.go new file mode 100644 index 00000000..f6405b2a --- /dev/null +++ b/pkg/github/models/repository_rule_member3.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleMember3 note: file_extension_restriction is in beta and subject to change.Prevent commits that include files with specified file extensions from being pushed to the commit graph. +type RepositoryRuleMember3 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 parameters property + parameters RepositoryRuleMember3_parametersable + // The type property + typeEscaped *RepositoryRuleMember3_type +} +// NewRepositoryRuleMember3 instantiates a new RepositoryRuleMember3 and sets the default values. +func NewRepositoryRuleMember3()(*RepositoryRuleMember3) { + m := &RepositoryRuleMember3{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember3FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember3FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember3(), 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 *RepositoryRuleMember3) 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 *RepositoryRuleMember3) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleMember3_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleMember3_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleMember3_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleMember3_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleMember3_parametersable when successful +func (m *RepositoryRuleMember3) GetParameters()(RepositoryRuleMember3_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleMember3_type when successful +func (m *RepositoryRuleMember3) GetTypeEscaped()(*RepositoryRuleMember3_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember3) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("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 *RepositoryRuleMember3) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleMember3) SetParameters(value RepositoryRuleMember3_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleMember3) SetTypeEscaped(value *RepositoryRuleMember3_type)() { + m.typeEscaped = value +} +type RepositoryRuleMember3able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleMember3_parametersable) + GetTypeEscaped()(*RepositoryRuleMember3_type) + SetParameters(value RepositoryRuleMember3_parametersable)() + SetTypeEscaped(value *RepositoryRuleMember3_type)() +} diff --git a/pkg/github/models/repository_rule_member3_parameters.go b/pkg/github/models/repository_rule_member3_parameters.go new file mode 100644 index 00000000..79ff508b --- /dev/null +++ b/pkg/github/models/repository_rule_member3_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleMember3_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 + // The file extensions that are restricted from being pushed to the commit graph. + restricted_file_extensions []string +} +// NewRepositoryRuleMember3_parameters instantiates a new RepositoryRuleMember3_parameters and sets the default values. +func NewRepositoryRuleMember3_parameters()(*RepositoryRuleMember3_parameters) { + m := &RepositoryRuleMember3_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember3_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember3_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember3_parameters(), 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 *RepositoryRuleMember3_parameters) 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 *RepositoryRuleMember3_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["restricted_file_extensions"] = 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.SetRestrictedFileExtensions(res) + } + return nil + } + return res +} +// GetRestrictedFileExtensions gets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph. +// returns a []string when successful +func (m *RepositoryRuleMember3_parameters) GetRestrictedFileExtensions()([]string) { + return m.restricted_file_extensions +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember3_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRestrictedFileExtensions() != nil { + err := writer.WriteCollectionOfStringValues("restricted_file_extensions", m.GetRestrictedFileExtensions()) + 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 *RepositoryRuleMember3_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRestrictedFileExtensions sets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph. +func (m *RepositoryRuleMember3_parameters) SetRestrictedFileExtensions(value []string)() { + m.restricted_file_extensions = value +} +type RepositoryRuleMember3_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRestrictedFileExtensions()([]string) + SetRestrictedFileExtensions(value []string)() +} diff --git a/pkg/github/models/repository_rule_member3_type.go b/pkg/github/models/repository_rule_member3_type.go new file mode 100644 index 00000000..bc575cc3 --- /dev/null +++ b/pkg/github/models/repository_rule_member3_type.go @@ -0,0 +1,30 @@ +package models +type RepositoryRuleMember3_type int + +const ( + FILE_EXTENSION_RESTRICTION_REPOSITORYRULEMEMBER3_TYPE RepositoryRuleMember3_type = iota +) + +func (i RepositoryRuleMember3_type) String() string { + return []string{"file_extension_restriction"}[i] +} +func ParseRepositoryRuleMember3_type(v string) (any, error) { + result := FILE_EXTENSION_RESTRICTION_REPOSITORYRULEMEMBER3_TYPE + switch v { + case "file_extension_restriction": + result = FILE_EXTENSION_RESTRICTION_REPOSITORYRULEMEMBER3_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeRepositoryRuleMember3_type(values []RepositoryRuleMember3_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleMember3_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_member4.go b/pkg/github/models/repository_rule_member4.go new file mode 100644 index 00000000..4f3a7922 --- /dev/null +++ b/pkg/github/models/repository_rule_member4.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RepositoryRuleMember4 note: max_file_size is in beta and subject to change.Prevent commits that exceed a specified file size limit from being pushed to the commit. +type RepositoryRuleMember4 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 parameters property + parameters RepositoryRuleMember4_parametersable + // The type property + typeEscaped *RepositoryRuleMember4_type +} +// NewRepositoryRuleMember4 instantiates a new RepositoryRuleMember4 and sets the default values. +func NewRepositoryRuleMember4()(*RepositoryRuleMember4) { + m := &RepositoryRuleMember4{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember4FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember4FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember4(), 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 *RepositoryRuleMember4) 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 *RepositoryRuleMember4) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRepositoryRuleMember4_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(RepositoryRuleMember4_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRepositoryRuleMember4_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*RepositoryRuleMember4_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a RepositoryRuleMember4_parametersable when successful +func (m *RepositoryRuleMember4) GetParameters()(RepositoryRuleMember4_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *RepositoryRuleMember4_type when successful +func (m *RepositoryRuleMember4) GetTypeEscaped()(*RepositoryRuleMember4_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember4) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("parameters", m.GetParameters()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("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 *RepositoryRuleMember4) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *RepositoryRuleMember4) SetParameters(value RepositoryRuleMember4_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RepositoryRuleMember4) SetTypeEscaped(value *RepositoryRuleMember4_type)() { + m.typeEscaped = value +} +type RepositoryRuleMember4able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(RepositoryRuleMember4_parametersable) + GetTypeEscaped()(*RepositoryRuleMember4_type) + SetParameters(value RepositoryRuleMember4_parametersable)() + SetTypeEscaped(value *RepositoryRuleMember4_type)() +} diff --git a/pkg/github/models/repository_rule_member4_parameters.go b/pkg/github/models/repository_rule_member4_parameters.go new file mode 100644 index 00000000..d61d97e9 --- /dev/null +++ b/pkg/github/models/repository_rule_member4_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RepositoryRuleMember4_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 + // The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). + max_file_size *int32 +} +// NewRepositoryRuleMember4_parameters instantiates a new RepositoryRuleMember4_parameters and sets the default values. +func NewRepositoryRuleMember4_parameters()(*RepositoryRuleMember4_parameters) { + m := &RepositoryRuleMember4_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRepositoryRuleMember4_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRepositoryRuleMember4_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRepositoryRuleMember4_parameters(), 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 *RepositoryRuleMember4_parameters) 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 *RepositoryRuleMember4_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFileSize(val) + } + return nil + } + return res +} +// GetMaxFileSize gets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +// returns a *int32 when successful +func (m *RepositoryRuleMember4_parameters) GetMaxFileSize()(*int32) { + return m.max_file_size +} +// Serialize serializes information the current object +func (m *RepositoryRuleMember4_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_size", m.GetMaxFileSize()) + 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 *RepositoryRuleMember4_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFileSize sets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +func (m *RepositoryRuleMember4_parameters) SetMaxFileSize(value *int32)() { + m.max_file_size = value +} +type RepositoryRuleMember4_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFileSize()(*int32) + SetMaxFileSize(value *int32)() +} diff --git a/pkg/github/models/repository_rule_member4_type.go b/pkg/github/models/repository_rule_member4_type.go new file mode 100644 index 00000000..54d4b529 --- /dev/null +++ b/pkg/github/models/repository_rule_member4_type.go @@ -0,0 +1,30 @@ +package models +type RepositoryRuleMember4_type int + +const ( + MAX_FILE_SIZE_REPOSITORYRULEMEMBER4_TYPE RepositoryRuleMember4_type = iota +) + +func (i RepositoryRuleMember4_type) String() string { + return []string{"max_file_size"}[i] +} +func ParseRepositoryRuleMember4_type(v string) (any, error) { + result := MAX_FILE_SIZE_REPOSITORYRULEMEMBER4_TYPE + switch v { + case "max_file_size": + result = MAX_FILE_SIZE_REPOSITORYRULEMEMBER4_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeRepositoryRuleMember4_type(values []RepositoryRuleMember4_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RepositoryRuleMember4_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule_non_fast_forward_type.go b/pkg/github/models/repository_rule_non_fast_forward_type.go index 5a1b21a0..122196eb 100644 --- a/pkg/github/models/repository_rule_non_fast_forward_type.go +++ b/pkg/github/models/repository_rule_non_fast_forward_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleNonFastForward_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleNonFastForward_type(v string) (any, error) { case "non_fast_forward": result = NON_FAST_FORWARD_REPOSITORYRULENONFASTFORWARD_TYPE default: - return 0, errors.New("Unknown RepositoryRuleNonFastForward_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go b/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go index 58efbb9b..56d3fcf9 100644 --- a/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go +++ b/pkg/github/models/repository_rule_params_code_scanning_tool_alerts_threshold.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." type RepositoryRuleParamsCodeScanningTool_alerts_threshold int @@ -27,7 +24,7 @@ func ParseRepositoryRuleParamsCodeScanningTool_alerts_threshold(v string) (any, case "all": result = ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_ALERTS_THRESHOLD default: - return 0, errors.New("Unknown RepositoryRuleParamsCodeScanningTool_alerts_threshold value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go b/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go index 5611aa62..95e98feb 100644 --- a/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go +++ b/pkg/github/models/repository_rule_params_code_scanning_tool_security_alerts_threshold.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." type RepositoryRuleParamsCodeScanningTool_security_alerts_threshold int @@ -30,7 +27,7 @@ func ParseRepositoryRuleParamsCodeScanningTool_security_alerts_threshold(v strin case "all": result = ALL_REPOSITORYRULEPARAMSCODESCANNINGTOOL_SECURITY_ALERTS_THRESHOLD default: - return 0, errors.New("Unknown RepositoryRuleParamsCodeScanningTool_security_alerts_threshold value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_pull_request_type.go b/pkg/github/models/repository_rule_pull_request_type.go index 976be58c..6fa59d2b 100644 --- a/pkg/github/models/repository_rule_pull_request_type.go +++ b/pkg/github/models/repository_rule_pull_request_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRulePullRequest_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRulePullRequest_type(v string) (any, error) { case "pull_request": result = PULL_REQUEST_REPOSITORYRULEPULLREQUEST_TYPE default: - return 0, errors.New("Unknown RepositoryRulePullRequest_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_required_deployments_type.go b/pkg/github/models/repository_rule_required_deployments_type.go index cafa5e92..53c69317 100644 --- a/pkg/github/models/repository_rule_required_deployments_type.go +++ b/pkg/github/models/repository_rule_required_deployments_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleRequiredDeployments_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleRequiredDeployments_type(v string) (any, error) { case "required_deployments": result = REQUIRED_DEPLOYMENTS_REPOSITORYRULEREQUIREDDEPLOYMENTS_TYPE default: - return 0, errors.New("Unknown RepositoryRuleRequiredDeployments_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_required_linear_history_type.go b/pkg/github/models/repository_rule_required_linear_history_type.go index ad62a700..b8f49b17 100644 --- a/pkg/github/models/repository_rule_required_linear_history_type.go +++ b/pkg/github/models/repository_rule_required_linear_history_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleRequiredLinearHistory_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleRequiredLinearHistory_type(v string) (any, error) { case "required_linear_history": result = REQUIRED_LINEAR_HISTORY_REPOSITORYRULEREQUIREDLINEARHISTORY_TYPE default: - return 0, errors.New("Unknown RepositoryRuleRequiredLinearHistory_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_required_signatures_type.go b/pkg/github/models/repository_rule_required_signatures_type.go index 2064b67e..4ef148cd 100644 --- a/pkg/github/models/repository_rule_required_signatures_type.go +++ b/pkg/github/models/repository_rule_required_signatures_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleRequiredSignatures_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleRequiredSignatures_type(v string) (any, error) { case "required_signatures": result = REQUIRED_SIGNATURES_REPOSITORYRULEREQUIREDSIGNATURES_TYPE default: - return 0, errors.New("Unknown RepositoryRuleRequiredSignatures_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_required_status_checks_type.go b/pkg/github/models/repository_rule_required_status_checks_type.go index 001208ff..0e36cef7 100644 --- a/pkg/github/models/repository_rule_required_status_checks_type.go +++ b/pkg/github/models/repository_rule_required_status_checks_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleRequiredStatusChecks_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleRequiredStatusChecks_type(v string) (any, error) { case "required_status_checks": result = REQUIRED_STATUS_CHECKS_REPOSITORYRULEREQUIREDSTATUSCHECKS_TYPE default: - return 0, errors.New("Unknown RepositoryRuleRequiredStatusChecks_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go b/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go index f35fb515..559c9eed 100644 --- a/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go +++ b/pkg/github/models/repository_rule_tag_name_pattern_parameters_operator.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The operator to use for matching. type RepositoryRuleTagNamePattern_parameters_operator int @@ -27,7 +24,7 @@ func ParseRepositoryRuleTagNamePattern_parameters_operator(v string) (any, error case "regex": result = REGEX_REPOSITORYRULETAGNAMEPATTERN_PARAMETERS_OPERATOR default: - return 0, errors.New("Unknown RepositoryRuleTagNamePattern_parameters_operator value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_tag_name_pattern_type.go b/pkg/github/models/repository_rule_tag_name_pattern_type.go index b435eb0f..6a094daa 100644 --- a/pkg/github/models/repository_rule_tag_name_pattern_type.go +++ b/pkg/github/models/repository_rule_tag_name_pattern_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleTagNamePattern_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleTagNamePattern_type(v string) (any, error) { case "tag_name_pattern": result = TAG_NAME_PATTERN_REPOSITORYRULETAGNAMEPATTERN_TYPE default: - return 0, errors.New("Unknown RepositoryRuleTagNamePattern_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_update_type.go b/pkg/github/models/repository_rule_update_type.go index 0867f523..a6733470 100644 --- a/pkg/github/models/repository_rule_update_type.go +++ b/pkg/github/models/repository_rule_update_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleUpdate_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleUpdate_type(v string) (any, error) { case "update": result = UPDATE_REPOSITORYRULEUPDATE_TYPE default: - return 0, errors.New("Unknown RepositoryRuleUpdate_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_rule_workflows_type.go b/pkg/github/models/repository_rule_workflows_type.go index 776cb3ed..978cbd7c 100644 --- a/pkg/github/models/repository_rule_workflows_type.go +++ b/pkg/github/models/repository_rule_workflows_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type RepositoryRuleWorkflows_type int const ( @@ -17,7 +14,7 @@ func ParseRepositoryRuleWorkflows_type(v string) (any, error) { case "workflows": result = WORKFLOWS_REPOSITORYRULEWORKFLOWS_TYPE default: - return 0, errors.New("Unknown RepositoryRuleWorkflows_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go index e6b3f602..39f567f6 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go +++ b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of actor that can bypass a ruleset. type RepositoryRulesetBypassActor_actor_type int @@ -30,7 +27,7 @@ func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { case "DeployKey": result = DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE default: - return 0, errors.New("Unknown RepositoryRulesetBypassActor_actor_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go index 93484ad4..0e3249df 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go +++ b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. type RepositoryRulesetBypassActor_bypass_mode int @@ -21,7 +18,7 @@ func ParseRepositoryRulesetBypassActor_bypass_mode(v string) (any, error) { case "pull_request": result = PULL_REQUEST_REPOSITORYRULESETBYPASSACTOR_BYPASS_MODE default: - return 0, errors.New("Unknown RepositoryRulesetBypassActor_bypass_mode value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_ruleset_current_user_can_bypass.go b/pkg/github/models/repository_ruleset_current_user_can_bypass.go index e3ed3cc9..c351e1a3 100644 --- a/pkg/github/models/repository_ruleset_current_user_can_bypass.go +++ b/pkg/github/models/repository_ruleset_current_user_can_bypass.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. type RepositoryRuleset_current_user_can_bypass int @@ -24,7 +21,7 @@ func ParseRepositoryRuleset_current_user_can_bypass(v string) (any, error) { case "never": result = NEVER_REPOSITORYRULESET_CURRENT_USER_CAN_BYPASS default: - return 0, errors.New("Unknown RepositoryRuleset_current_user_can_bypass value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_ruleset_source_type.go b/pkg/github/models/repository_ruleset_source_type.go index 2334e3a8..4f486276 100644 --- a/pkg/github/models/repository_ruleset_source_type.go +++ b/pkg/github/models/repository_ruleset_source_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of the source of the ruleset type RepositoryRuleset_source_type int @@ -21,7 +18,7 @@ func ParseRepositoryRuleset_source_type(v string) (any, error) { case "Organization": result = ORGANIZATION_REPOSITORYRULESET_SOURCE_TYPE default: - return 0, errors.New("Unknown RepositoryRuleset_source_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_ruleset_target.go b/pkg/github/models/repository_ruleset_target.go index 682eb98b..b4ec8e8f 100644 --- a/pkg/github/models/repository_ruleset_target.go +++ b/pkg/github/models/repository_ruleset_target.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RepositoryRuleset_target int @@ -24,7 +21,7 @@ func ParseRepositoryRuleset_target(v string) (any, error) { case "push": result = PUSH_REPOSITORYRULESET_TARGET default: - return 0, errors.New("Unknown RepositoryRuleset_target value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_squash_merge_commit_message.go b/pkg/github/models/repository_squash_merge_commit_message.go index e3b0aa9f..7d7099ce 100644 --- a/pkg/github/models/repository_squash_merge_commit_message.go +++ b/pkg/github/models/repository_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type Repository_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseRepository_squash_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_REPOSITORY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown Repository_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/repository_squash_merge_commit_title.go b/pkg/github/models/repository_squash_merge_commit_title.go index c01b3d31..f012f267 100644 --- a/pkg/github/models/repository_squash_merge_commit_title.go +++ b/pkg/github/models/repository_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type Repository_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseRepository_squash_merge_commit_title(v string) (any, error) { case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_REPOSITORY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown Repository_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/review_comment_side.go b/pkg/github/models/review_comment_side.go index b1e51ea6..709785d7 100644 --- a/pkg/github/models/review_comment_side.go +++ b/pkg/github/models/review_comment_side.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The side of the first line of the range for a multi-line comment. type ReviewComment_side int @@ -21,7 +18,7 @@ func ParseReviewComment_side(v string) (any, error) { case "RIGHT": result = RIGHT_REVIEWCOMMENT_SIDE default: - return 0, errors.New("Unknown ReviewComment_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/review_comment_start_side.go b/pkg/github/models/review_comment_start_side.go index 394c4a67..80b32dd6 100644 --- a/pkg/github/models/review_comment_start_side.go +++ b/pkg/github/models/review_comment_start_side.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The side of the first line of the range for a multi-line comment. type ReviewComment_start_side int @@ -21,7 +18,7 @@ func ParseReviewComment_start_side(v string) (any, error) { case "RIGHT": result = RIGHT_REVIEWCOMMENT_START_SIDE default: - return 0, errors.New("Unknown ReviewComment_start_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/review_custom_gates_state_required_state.go b/pkg/github/models/review_custom_gates_state_required_state.go index efe458a9..79db28d8 100644 --- a/pkg/github/models/review_custom_gates_state_required_state.go +++ b/pkg/github/models/review_custom_gates_state_required_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether to approve or reject deployment to the specified environments. type ReviewCustomGatesStateRequired_state int @@ -21,7 +18,7 @@ func ParseReviewCustomGatesStateRequired_state(v string) (any, error) { case "rejected": result = REJECTED_REVIEWCUSTOMGATESSTATEREQUIRED_STATE default: - return 0, errors.New("Unknown ReviewCustomGatesStateRequired_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suite_evaluation_result.go b/pkg/github/models/rule_suite_evaluation_result.go index bdea671e..3119bb25 100644 --- a/pkg/github/models/rule_suite_evaluation_result.go +++ b/pkg/github/models/rule_suite_evaluation_result.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. type RuleSuite_evaluation_result int @@ -21,7 +18,7 @@ func ParseRuleSuite_evaluation_result(v string) (any, error) { case "fail": result = FAIL_RULESUITE_EVALUATION_RESULT default: - return 0, errors.New("Unknown RuleSuite_evaluation_result value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suite_result.go b/pkg/github/models/rule_suite_result.go index 276cc0bb..9c429e6b 100644 --- a/pkg/github/models/rule_suite_result.go +++ b/pkg/github/models/rule_suite_result.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The result of the rule evaluations for rules with the `active` enforcement status. type RuleSuite_result int @@ -24,7 +21,7 @@ func ParseRuleSuite_result(v string) (any, error) { case "bypass": result = BYPASS_RULESUITE_RESULT default: - return 0, errors.New("Unknown RuleSuite_result value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suite_rule_evaluations_enforcement.go b/pkg/github/models/rule_suite_rule_evaluations_enforcement.go index 3b1b54bf..1ddc02ce 100644 --- a/pkg/github/models/rule_suite_rule_evaluations_enforcement.go +++ b/pkg/github/models/rule_suite_rule_evaluations_enforcement.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The enforcement level of this rule source. type RuleSuite_rule_evaluations_enforcement int @@ -24,7 +21,7 @@ func ParseRuleSuite_rule_evaluations_enforcement(v string) (any, error) { case "deleted ruleset": result = DELETEDRULESET_RULESUITE_RULE_EVALUATIONS_ENFORCEMENT default: - return 0, errors.New("Unknown RuleSuite_rule_evaluations_enforcement value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suite_rule_evaluations_result.go b/pkg/github/models/rule_suite_rule_evaluations_result.go index b93259e0..24ea62d5 100644 --- a/pkg/github/models/rule_suite_rule_evaluations_result.go +++ b/pkg/github/models/rule_suite_rule_evaluations_result.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The result of the evaluation of the individual rule. type RuleSuite_rule_evaluations_result int @@ -21,7 +18,7 @@ func ParseRuleSuite_rule_evaluations_result(v string) (any, error) { case "fail": result = FAIL_RULESUITE_RULE_EVALUATIONS_RESULT default: - return 0, errors.New("Unknown RuleSuite_rule_evaluations_result value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suites_evaluation_result.go b/pkg/github/models/rule_suites_evaluation_result.go index 36ca145a..764d5498 100644 --- a/pkg/github/models/rule_suites_evaluation_result.go +++ b/pkg/github/models/rule_suites_evaluation_result.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. type RuleSuites_evaluation_result int @@ -21,7 +18,7 @@ func ParseRuleSuites_evaluation_result(v string) (any, error) { case "fail": result = FAIL_RULESUITES_EVALUATION_RESULT default: - return 0, errors.New("Unknown RuleSuites_evaluation_result value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/rule_suites_result.go b/pkg/github/models/rule_suites_result.go index 2de4355a..c660e6cc 100644 --- a/pkg/github/models/rule_suites_result.go +++ b/pkg/github/models/rule_suites_result.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The result of the rule evaluations for rules with the `active` enforcement status. type RuleSuites_result int @@ -24,7 +21,7 @@ func ParseRuleSuites_result(v string) (any, error) { case "bypass": result = BYPASS_RULESUITES_RESULT default: - return 0, errors.New("Unknown RuleSuites_result value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/runner_label_type.go b/pkg/github/models/runner_label_type.go index 2c93d19b..117d258d 100644 --- a/pkg/github/models/runner_label_type.go +++ b/pkg/github/models/runner_label_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of label. Read-only labels are applied automatically when the runner is configured. type RunnerLabel_type int @@ -21,7 +18,7 @@ func ParseRunnerLabel_type(v string) (any, error) { case "custom": result = CUSTOM_RUNNERLABEL_TYPE default: - return 0, errors.New("Unknown RunnerLabel_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/secret_scanning_alert_resolution.go b/pkg/github/models/secret_scanning_alert_resolution.go index f6f615bf..d5620971 100644 --- a/pkg/github/models/secret_scanning_alert_resolution.go +++ b/pkg/github/models/secret_scanning_alert_resolution.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // **Required when the `state` is `resolved`.** The reason for resolving the alert. type SecretScanningAlertResolution int @@ -27,7 +24,7 @@ func ParseSecretScanningAlertResolution(v string) (any, error) { case "used_in_tests": result = USED_IN_TESTS_SECRETSCANNINGALERTRESOLUTION default: - return 0, errors.New("Unknown SecretScanningAlertResolution value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/secret_scanning_alert_state.go b/pkg/github/models/secret_scanning_alert_state.go index 647a0890..f390eba6 100644 --- a/pkg/github/models/secret_scanning_alert_state.go +++ b/pkg/github/models/secret_scanning_alert_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. type SecretScanningAlertState int @@ -21,7 +18,7 @@ func ParseSecretScanningAlertState(v string) (any, error) { case "resolved": result = RESOLVED_SECRETSCANNINGALERTSTATE default: - return 0, errors.New("Unknown SecretScanningAlertState value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/secret_scanning_alert_validity.go b/pkg/github/models/secret_scanning_alert_validity.go index d7cd1118..d63fd164 100644 --- a/pkg/github/models/secret_scanning_alert_validity.go +++ b/pkg/github/models/secret_scanning_alert_validity.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The token status as of the latest validity check. type SecretScanningAlert_validity int @@ -24,7 +21,7 @@ func ParseSecretScanningAlert_validity(v string) (any, error) { case "unknown": result = UNKNOWN_SECRETSCANNINGALERT_VALIDITY default: - return 0, errors.New("Unknown SecretScanningAlert_validity value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/secret_scanning_location_type.go b/pkg/github/models/secret_scanning_location_type.go index f5ba61cd..2a2c3e14 100644 --- a/pkg/github/models/secret_scanning_location_type.go +++ b/pkg/github/models/secret_scanning_location_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. type SecretScanningLocation_type int @@ -54,7 +51,7 @@ func ParseSecretScanningLocation_type(v string) (any, error) { case "pull_request_review_comment": result = PULL_REQUEST_REVIEW_COMMENT_SECRETSCANNINGLOCATION_TYPE default: - return 0, errors.New("Unknown SecretScanningLocation_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_advisory_credit_types.go b/pkg/github/models/security_advisory_credit_types.go index fca2756c..4d65384c 100644 --- a/pkg/github/models/security_advisory_credit_types.go +++ b/pkg/github/models/security_advisory_credit_types.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The type of credit the user is receiving. type SecurityAdvisoryCreditTypes int @@ -45,7 +42,7 @@ func ParseSecurityAdvisoryCreditTypes(v string) (any, error) { case "other": result = OTHER_SECURITYADVISORYCREDITTYPES default: - return 0, errors.New("Unknown SecurityAdvisoryCreditTypes value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_advisory_ecosystems.go b/pkg/github/models/security_advisory_ecosystems.go index d22ab7bd..7794d66c 100644 --- a/pkg/github/models/security_advisory_ecosystems.go +++ b/pkg/github/models/security_advisory_ecosystems.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The package's language or package management ecosystem. type SecurityAdvisoryEcosystems int @@ -54,7 +51,7 @@ func ParseSecurityAdvisoryEcosystems(v string) (any, error) { case "swift": result = SWIFT_SECURITYADVISORYECOSYSTEMS default: - return 0, errors.New("Unknown SecurityAdvisoryEcosystems value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_and_analysis_advanced_security_status.go b/pkg/github/models/security_and_analysis_advanced_security_status.go index 2063e015..cc36996c 100644 --- a/pkg/github/models/security_and_analysis_advanced_security_status.go +++ b/pkg/github/models/security_and_analysis_advanced_security_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type SecurityAndAnalysis_advanced_security_status int const ( @@ -20,7 +17,7 @@ func ParseSecurityAndAnalysis_advanced_security_status(v string) (any, error) { case "disabled": result = DISABLED_SECURITYANDANALYSIS_ADVANCED_SECURITY_STATUS default: - return 0, errors.New("Unknown SecurityAndAnalysis_advanced_security_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go b/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go index 906d4c8b..2e902915 100644 --- a/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go +++ b/pkg/github/models/security_and_analysis_dependabot_security_updates_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The enablement status of Dependabot security updates for the repository. type SecurityAndAnalysis_dependabot_security_updates_status int @@ -21,7 +18,7 @@ func ParseSecurityAndAnalysis_dependabot_security_updates_status(v string) (any, case "disabled": result = DISABLED_SECURITYANDANALYSIS_DEPENDABOT_SECURITY_UPDATES_STATUS default: - return 0, errors.New("Unknown SecurityAndAnalysis_dependabot_security_updates_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go b/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go index 985ae0b2..2b5e12d2 100644 --- a/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go +++ b/pkg/github/models/security_and_analysis_secret_scanning_push_protection_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type SecurityAndAnalysis_secret_scanning_push_protection_status int const ( @@ -20,7 +17,7 @@ func ParseSecurityAndAnalysis_secret_scanning_push_protection_status(v string) ( case "disabled": result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_PUSH_PROTECTION_STATUS default: - return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_push_protection_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/security_and_analysis_secret_scanning_status.go b/pkg/github/models/security_and_analysis_secret_scanning_status.go index 59118e7d..00909bcf 100644 --- a/pkg/github/models/security_and_analysis_secret_scanning_status.go +++ b/pkg/github/models/security_and_analysis_secret_scanning_status.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type SecurityAndAnalysis_secret_scanning_status int const ( @@ -20,7 +17,7 @@ func ParseSecurityAndAnalysis_secret_scanning_status(v string) (any, error) { case "disabled": result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_STATUS default: - return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/simple_classroom_assignment_type.go b/pkg/github/models/simple_classroom_assignment_type.go index 5e9dfb1b..50d236c3 100644 --- a/pkg/github/models/simple_classroom_assignment_type.go +++ b/pkg/github/models/simple_classroom_assignment_type.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // Whether it's a Group Assignment or Individual Assignment. type SimpleClassroomAssignment_type int @@ -21,7 +18,7 @@ func ParseSimpleClassroomAssignment_type(v string) (any, error) { case "group": result = GROUP_SIMPLECLASSROOMASSIGNMENT_TYPE default: - return 0, errors.New("Unknown SimpleClassroomAssignment_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/team_full_notification_setting.go b/pkg/github/models/team_full_notification_setting.go index 6bcdc7d8..d8d0c92b 100644 --- a/pkg/github/models/team_full_notification_setting.go +++ b/pkg/github/models/team_full_notification_setting.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The notification setting the team has set type TeamFull_notification_setting int @@ -21,7 +18,7 @@ func ParseTeamFull_notification_setting(v string) (any, error) { case "notifications_disabled": result = NOTIFICATIONS_DISABLED_TEAMFULL_NOTIFICATION_SETTING default: - return 0, errors.New("Unknown TeamFull_notification_setting value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/team_full_privacy.go b/pkg/github/models/team_full_privacy.go index 1b7d0f4d..5114ae48 100644 --- a/pkg/github/models/team_full_privacy.go +++ b/pkg/github/models/team_full_privacy.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The level of privacy this team should have type TeamFull_privacy int @@ -21,7 +18,7 @@ func ParseTeamFull_privacy(v string) (any, error) { case "secret": result = SECRET_TEAMFULL_PRIVACY default: - return 0, errors.New("Unknown TeamFull_privacy value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/team_membership_role.go b/pkg/github/models/team_membership_role.go index e280eb0a..b23d6953 100644 --- a/pkg/github/models/team_membership_role.go +++ b/pkg/github/models/team_membership_role.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The role of the user in the team. type TeamMembership_role int @@ -21,7 +18,7 @@ func ParseTeamMembership_role(v string) (any, error) { case "maintainer": result = MAINTAINER_TEAMMEMBERSHIP_ROLE default: - return 0, errors.New("Unknown TeamMembership_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/team_membership_state.go b/pkg/github/models/team_membership_state.go index 17b0580a..c1e6f4e5 100644 --- a/pkg/github/models/team_membership_state.go +++ b/pkg/github/models/team_membership_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) // The state of the user's membership in the team. type TeamMembership_state int @@ -21,7 +18,7 @@ func ParseTeamMembership_state(v string) (any, error) { case "pending": result = PENDING_TEAMMEMBERSHIP_STATE default: - return 0, errors.New("Unknown TeamMembership_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/models/workflow_state.go b/pkg/github/models/workflow_state.go index 9078846d..22028ea1 100644 --- a/pkg/github/models/workflow_state.go +++ b/pkg/github/models/workflow_state.go @@ -1,7 +1,4 @@ package models -import ( - "errors" -) type Workflow_state int const ( @@ -29,7 +26,7 @@ func ParseWorkflow_state(v string) (any, error) { case "disabled_manually": result = DISABLED_MANUALLY_WORKFLOW_STATE default: - return 0, errors.New("Unknown Workflow_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go index b2b460f6..5ce7ac3c 100644 --- a/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go +++ b/pkg/github/orgs/item/actions/secrets/item/with_secret_name_put_request_body_visibility.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. type WithSecret_namePutRequestBody_visibility int @@ -24,7 +21,7 @@ func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { case "selected": result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go b/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go index 97d17fab..cc0f773d 100644 --- a/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go +++ b/pkg/github/orgs/item/actions/variables/item/with_name_patch_request_body_visibility.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. type WithNamePatchRequestBody_visibility int @@ -24,7 +21,7 @@ func ParseWithNamePatchRequestBody_visibility(v string) (any, error) { case "selected": result = SELECTED_WITHNAMEPATCHREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown WithNamePatchRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go b/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go index 8454fda4..2e22b42d 100644 --- a/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go +++ b/pkg/github/orgs/item/actions/variables/variables_post_request_body_visibility.go @@ -1,7 +1,4 @@ package variables -import ( - "errors" -) // The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. type VariablesPostRequestBody_visibility int @@ -24,7 +21,7 @@ func ParseVariablesPostRequestBody_visibility(v string) (any, error) { case "selected": result = SELECTED_VARIABLESPOSTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown VariablesPostRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/codescanning/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/codescanning/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go b/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go index 0d374101..e3984a0b 100644 --- a/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go +++ b/pkg/github/orgs/item/codespaces/access/access_put_request_body_visibility.go @@ -1,7 +1,4 @@ package access -import ( - "errors" -) // Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. type AccessPutRequestBody_visibility int @@ -27,7 +24,7 @@ func ParseAccessPutRequestBody_visibility(v string) (any, error) { case "all_members_and_outside_collaborators": result = ALL_MEMBERS_AND_OUTSIDE_COLLABORATORS_ACCESSPUTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown AccessPutRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go index b2b460f6..5ce7ac3c 100644 --- a/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go +++ b/pkg/github/orgs/item/codespaces/secrets/item/with_secret_name_put_request_body_visibility.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. type WithSecret_namePutRequestBody_visibility int @@ -24,7 +21,7 @@ func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { case "selected": result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go index 906bdb78..5d3e9a31 100644 --- a/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go +++ b/pkg/github/orgs/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetScopeQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetScopeQueryParameterType(v string) (any, error) { case "runtime": result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go b/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go index b2b460f6..5ce7ac3c 100644 --- a/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go +++ b/pkg/github/orgs/item/dependabot/secrets/item/with_secret_name_put_request_body_visibility.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. type WithSecret_namePutRequestBody_visibility int @@ -24,7 +21,7 @@ func ParseWithSecret_namePutRequestBody_visibility(v string) (any, error) { case "selected": result = SELECTED_WITHSECRET_NAMEPUTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown WithSecret_namePutRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go b/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go index 9048b943..d4be83b3 100644 --- a/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go +++ b/pkg/github/orgs/item/invitations/get_invitation_source_query_parameter_type.go @@ -1,7 +1,4 @@ package invitations -import ( - "errors" -) type GetInvitation_sourceQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetInvitation_sourceQueryParameterType(v string) (any, error) { case "scim": result = SCIM_GETINVITATION_SOURCEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetInvitation_sourceQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go b/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go index afd7d40b..aa2313d0 100644 --- a/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go +++ b/pkg/github/orgs/item/invitations/get_role_query_parameter_type.go @@ -1,7 +1,4 @@ package invitations -import ( - "errors" -) type GetRoleQueryParameterType int const ( @@ -29,7 +26,7 @@ func ParseGetRoleQueryParameterType(v string) (any, error) { case "hiring_manager": result = HIRING_MANAGER_GETROLEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go b/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go index ad846479..6063b8bd 100644 --- a/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go +++ b/pkg/github/orgs/item/invitations/invitations_post_request_body_role.go @@ -1,7 +1,4 @@ package invitations -import ( - "errors" -) // The role for the new member. * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization. type InvitationsPostRequestBody_role int @@ -27,7 +24,7 @@ func ParseInvitationsPostRequestBody_role(v string) (any, error) { case "reinstate": result = REINSTATE_INVITATIONSPOSTREQUESTBODY_ROLE default: - return 0, errors.New("Unknown InvitationsPostRequestBody_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go b/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go index 6aca6ecb..f176c1cc 100644 --- a/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/issues/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go b/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go index bd35fa09..0c77b959 100644 --- a/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go +++ b/pkg/github/orgs/item/issues/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go b/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go index ba962acf..10b7912a 100644 --- a/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/issues/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "comments": result = COMMENTS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/issues/get_state_query_parameter_type.go b/pkg/github/orgs/item/issues/get_state_query_parameter_type.go index 55415107..065faf93 100644 --- a/pkg/github/orgs/item/issues/get_state_query_parameter_type.go +++ b/pkg/github/orgs/item/issues/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go b/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go index ca6be464..e38e6874 100644 --- a/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go +++ b/pkg/github/orgs/item/item/item/with_enablement_post_request_body_query_suite.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // CodeQL query suite to be used. If you specify the `query_suite` parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured.If you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied. type WithEnablementPostRequestBody_query_suite int @@ -21,7 +18,7 @@ func ParseWithEnablementPostRequestBody_query_suite(v string) (any, error) { case "extended": result = EXTENDED_WITHENABLEMENTPOSTREQUESTBODY_QUERY_SUITE default: - return 0, errors.New("Unknown WithEnablementPostRequestBody_query_suite value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/members/get_filter_query_parameter_type.go b/pkg/github/orgs/item/members/get_filter_query_parameter_type.go index fcf97ec9..483c6d8b 100644 --- a/pkg/github/orgs/item/members/get_filter_query_parameter_type.go +++ b/pkg/github/orgs/item/members/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package members -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/members/get_role_query_parameter_type.go b/pkg/github/orgs/item/members/get_role_query_parameter_type.go index b8a87b1f..92002b01 100644 --- a/pkg/github/orgs/item/members/get_role_query_parameter_type.go +++ b/pkg/github/orgs/item/members/get_role_query_parameter_type.go @@ -1,7 +1,4 @@ package members -import ( - "errors" -) type GetRoleQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetRoleQueryParameterType(v string) (any, error) { case "member": result = MEMBER_GETROLEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go index 84252190..01e9b75a 100644 --- a/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go +++ b/pkg/github/orgs/item/memberships/item/with_username_put_request_body_role.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The role to give the user in the organization. Can be one of: * `admin` - The user will become an owner of the organization. * `member` - The user will become a non-owner member of the organization. type WithUsernamePutRequestBody_role int @@ -21,7 +18,7 @@ func ParseWithUsernamePutRequestBody_role(v string) (any, error) { case "member": result = MEMBER_WITHUSERNAMEPUTREQUESTBODY_ROLE default: - return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go b/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go index 2f48bb7f..151552bd 100644 --- a/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go +++ b/pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.go @@ -1,7 +1,4 @@ package migrations -import ( - "errors" -) // Allowed values that can be passed to the exclude param. type GetExcludeQueryParameterType int @@ -18,7 +15,7 @@ func ParseGetExcludeQueryParameterType(v string) (any, error) { case "repositories": result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go b/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go index a67821d8..e2033d1e 100644 --- a/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go +++ b/pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Allowed values that can be passed to the exclude param. type GetExcludeQueryParameterType int @@ -18,7 +15,7 @@ func ParseGetExcludeQueryParameterType(v string) (any, error) { case "repositories": result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go b/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go index 522a8b57..b2d7de5c 100644 --- a/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go +++ b/pkg/github/orgs/item/migrations/migrations_post_request_body_exclude.go @@ -1,7 +1,4 @@ package migrations -import ( - "errors" -) type MigrationsPostRequestBody_exclude int const ( @@ -17,7 +14,7 @@ func ParseMigrationsPostRequestBody_exclude(v string) (any, error) { case "repositories": result = REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE default: - return 0, errors.New("Unknown MigrationsPostRequestBody_exclude value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go b/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go index b56cab1e..0d261e2b 100644 --- a/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go +++ b/pkg/github/orgs/item/outside_collaborators/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package outside_collaborators -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go b/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go index ae4025d3..071c8927 100644 --- a/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go +++ b/pkg/github/orgs/item/packages/get_package_type_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetPackage_typeQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetPackage_typeQueryParameterType(v string) (any, error) { case "container": result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go b/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go index daf1c43e..f6ffbef0 100644 --- a/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go +++ b/pkg/github/orgs/item/packages/get_visibility_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetVisibilityQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetVisibilityQueryParameterType(v string) (any, error) { case "internal": result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go b/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go index cf4ef3c8..e78d12f6 100644 --- a/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go +++ b/pkg/github/orgs/item/packages/item/item/versions/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package versions -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "deleted": result = DELETED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go index af4892ea..1057bb73 100644 --- a/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/personalaccesstokenrequests/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package personalaccesstokenrequests -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go index cf8d1a84..b7d3fa02 100644 --- a/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/personalaccesstokenrequests/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package personalaccesstokenrequests -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -17,7 +14,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "created_at": result = CREATED_AT_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go index 037ab7ee..4cecc464 100644 --- a/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go +++ b/pkg/github/orgs/item/personalaccesstokenrequests/item/with_pat_request_post_request_body_action.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Action to apply to the request. type WithPat_request_PostRequestBody_action int @@ -21,7 +18,7 @@ func ParseWithPat_request_PostRequestBody_action(v string) (any, error) { case "deny": result = DENY_WITHPAT_REQUEST_POSTREQUESTBODY_ACTION default: - return 0, errors.New("Unknown WithPat_request_PostRequestBody_action value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go index 6c75c9aa..9116530e 100644 --- a/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go +++ b/pkg/github/orgs/item/personalaccesstokenrequests/personal_access_token_requests_post_request_body_action.go @@ -1,7 +1,4 @@ package personalaccesstokenrequests -import ( - "errors" -) // Action to apply to the requests. type PersonalAccessTokenRequestsPostRequestBody_action int @@ -21,7 +18,7 @@ func ParsePersonalAccessTokenRequestsPostRequestBody_action(v string) (any, erro case "deny": result = DENY_PERSONALACCESSTOKENREQUESTSPOSTREQUESTBODY_ACTION default: - return 0, errors.New("Unknown PersonalAccessTokenRequestsPostRequestBody_action value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go index aa02e9d6..fb86dd29 100644 --- a/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/personalaccesstokens/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package personalaccesstokens -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go b/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go index ad59d82e..a32127f2 100644 --- a/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/personalaccesstokens/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package personalaccesstokens -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -17,7 +14,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "created_at": result = CREATED_AT_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go index 8e562bc0..7ba18a94 100644 --- a/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go +++ b/pkg/github/orgs/item/personalaccesstokens/item/with_pat_post_request_body_action.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Action to apply to the fine-grained personal access token. type WithPat_PostRequestBody_action int @@ -18,7 +15,7 @@ func ParseWithPat_PostRequestBody_action(v string) (any, error) { case "revoke": result = REVOKE_WITHPAT_POSTREQUESTBODY_ACTION default: - return 0, errors.New("Unknown WithPat_PostRequestBody_action value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go b/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go index 4bafd562..ef59bba5 100644 --- a/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go +++ b/pkg/github/orgs/item/personalaccesstokens/personal_access_tokens_post_request_body_action.go @@ -1,7 +1,4 @@ package personalaccesstokens -import ( - "errors" -) // Action to apply to the fine-grained personal access token. type PersonalAccessTokensPostRequestBody_action int @@ -18,7 +15,7 @@ func ParsePersonalAccessTokensPostRequestBody_action(v string) (any, error) { case "revoke": result = REVOKE_PERSONALACCESSTOKENSPOSTREQUESTBODY_ACTION default: - return 0, errors.New("Unknown PersonalAccessTokensPostRequestBody_action value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/projects/get_state_query_parameter_type.go b/pkg/github/orgs/item/projects/get_state_query_parameter_type.go index 985374b5..2c9bc230 100644 --- a/pkg/github/orgs/item/projects/get_state_query_parameter_type.go +++ b/pkg/github/orgs/item/projects/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package projects -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go index 8b1bf404..fb0f2135 100644 --- a/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go +++ b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The type of the value for the property type WithCustom_property_namePutRequestBody_value_type int @@ -21,7 +18,7 @@ func ParseWithCustom_property_namePutRequestBody_value_type(v string) (any, erro case "single_select": result = SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE default: - return 0, errors.New("Unknown WithCustom_property_namePutRequestBody_value_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go b/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go index afa5d0fa..03a299e2 100644 --- a/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/repos/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go b/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go index 8dee1bb8..58939d2b 100644 --- a/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/repos/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "full_name": result = FULL_NAME_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/get_type_query_parameter_type.go b/pkg/github/orgs/item/repos/get_type_query_parameter_type.go index 25170203..f4eb3ebe 100644 --- a/pkg/github/orgs/item/repos/get_type_query_parameter_type.go +++ b/pkg/github/orgs/item/repos/get_type_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetTypeQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetTypeQueryParameterType(v string) (any, error) { case "member": result = MEMBER_GETTYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go index 50a0ccf4..38d5b057 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_message.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type ReposPostRequestBody_merge_commit_message int @@ -24,7 +21,7 @@ func ParseReposPostRequestBody_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go index dd1e4b9d..27a28651 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_merge_commit_title.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type ReposPostRequestBody_merge_commit_title int @@ -21,7 +18,7 @@ func ParseReposPostRequestBody_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go index 0ecd209b..1e336e72 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type ReposPostRequestBody_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseReposPostRequestBody_squash_merge_commit_message(v string) (any, error case "BLANK": result = BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go index 51ceb4f6..39555681 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type ReposPostRequestBody_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseReposPostRequestBody_squash_merge_commit_title(v string) (any, error) case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go b/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go index 05511876..fac8df10 100644 --- a/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go +++ b/pkg/github/orgs/item/repos/repos_post_request_body_visibility.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The visibility of the repository. type ReposPostRequestBody_visibility int @@ -21,7 +18,7 @@ func ParseReposPostRequestBody_visibility(v string) (any, error) { case "private": result = PRIVATE_REPOSPOSTREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown ReposPostRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go index 2e18033f..d4c79d20 100644 --- a/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go +++ b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type WithRuleset_PutRequestBody_target int @@ -24,7 +21,7 @@ func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { case "push": result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET default: - return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go index 210257c5..a35713d6 100644 --- a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go +++ b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go @@ -1,7 +1,4 @@ package rulesets -import ( - "errors" -) // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RulesetsPostRequestBody_target int @@ -24,7 +21,7 @@ func ParseRulesetsPostRequestBody_target(v string) (any, error) { case "push": result = PUSH_RULESETSPOSTREQUESTBODY_TARGET default: - return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go b/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go index 91a669a6..8665bcb0 100644 --- a/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go +++ b/pkg/github/orgs/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go @@ -1,7 +1,4 @@ package rulesuites -import ( - "errors" -) type GetRule_suite_resultQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetRule_suite_resultQueryParameterType(v string) (any, error) { case "all": result = ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRule_suite_resultQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go b/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go index 82dfab2d..ae408634 100644 --- a/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go +++ b/pkg/github/orgs/item/rulesets/rulesuites/get_time_period_query_parameter_type.go @@ -1,7 +1,4 @@ package rulesuites -import ( - "errors" -) type GetTime_periodQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetTime_periodQueryParameterType(v string) (any, error) { case "month": result = MONTH_GETTIME_PERIODQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go index 382957f5..ae552fb1 100644 --- a/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go +++ b/pkg/github/orgs/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "resolved": result = RESOLVED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go index 41aa1584..68510508 100644 --- a/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/securityadvisories/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go index 93822450..cd214218 100644 --- a/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/securityadvisories/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "published": result = PUBLISHED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go b/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go index 4f106c12..910881dd 100644 --- a/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go +++ b/pkg/github/orgs/item/securityadvisories/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "closed": result = CLOSED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go index 9b519628..464403a3 100644 --- a/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/teams/item/discussions/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package discussions -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go index ac255063..6561eb6a 100644 --- a/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go index c934402d..5b2e6072 100644 --- a/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/orgs/item/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go b/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/orgs/item/teams/item/discussions/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go b/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go index 114e88e0..733707c9 100644 --- a/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/orgs/item/teams/item/discussions/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go b/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go index d4e359b4..4d703803 100644 --- a/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go +++ b/pkg/github/orgs/item/teams/item/members/get_role_query_parameter_type.go @@ -1,7 +1,4 @@ package members -import ( - "errors" -) type GetRoleQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetRoleQueryParameterType(v string) (any, error) { case "all": result = ALL_GETROLEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go index 33df378a..d01d40bb 100644 --- a/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go +++ b/pkg/github/orgs/item/teams/item/memberships/item/with_username_put_request_body_role.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The role that this user should have in the team. type WithUsernamePutRequestBody_role int @@ -21,7 +18,7 @@ func ParseWithUsernamePutRequestBody_role(v string) (any, error) { case "maintainer": result = MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE default: - return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go b/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go index 830dd0aa..d7978dc3 100644 --- a/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go +++ b/pkg/github/orgs/item/teams/item/projects/item/with_project_put_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." type WithProject_PutRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithProject_PutRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithProject_PutRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go index e8cc3110..199c4f32 100644 --- a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_notification_setting.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. type WithTeam_slugPatchRequestBody_notification_setting int @@ -21,7 +18,7 @@ func ParseWithTeam_slugPatchRequestBody_notification_setting(v string) (any, err case "notifications_disabled": result = NOTIFICATIONS_DISABLED_WITHTEAM_SLUGPATCHREQUESTBODY_NOTIFICATION_SETTING default: - return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_notification_setting value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go index 565ec6ac..a79e7086 100644 --- a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // **Deprecated**. The permission that new repositories will be added to the team with when none is specified. type WithTeam_slugPatchRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithTeam_slugPatchRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHTEAM_SLUGPATCHREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go index 7a403885..4b6ec024 100644 --- a/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go +++ b/pkg/github/orgs/item/teams/item/with_team_slug_patch_request_body_privacy.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. **For a parent or child team:** * `closed` - visible to all members of this organization. type WithTeam_slugPatchRequestBody_privacy int @@ -21,7 +18,7 @@ func ParseWithTeam_slugPatchRequestBody_privacy(v string) (any, error) { case "closed": result = CLOSED_WITHTEAM_SLUGPATCHREQUESTBODY_PRIVACY default: - return 0, errors.New("Unknown WithTeam_slugPatchRequestBody_privacy value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go b/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go index 29e0eb2d..f0397eba 100644 --- a/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go +++ b/pkg/github/orgs/item/teams/teams_post_request_body_notification_setting.go @@ -1,7 +1,4 @@ package teams -import ( - "errors" -) // The notification setting the team has chosen. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. Default: `notifications_enabled` type TeamsPostRequestBody_notification_setting int @@ -21,7 +18,7 @@ func ParseTeamsPostRequestBody_notification_setting(v string) (any, error) { case "notifications_disabled": result = NOTIFICATIONS_DISABLED_TEAMSPOSTREQUESTBODY_NOTIFICATION_SETTING default: - return 0, errors.New("Unknown TeamsPostRequestBody_notification_setting value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_permission.go b/pkg/github/orgs/item/teams/teams_post_request_body_permission.go index df15d380..3440cd2a 100644 --- a/pkg/github/orgs/item/teams/teams_post_request_body_permission.go +++ b/pkg/github/orgs/item/teams/teams_post_request_body_permission.go @@ -1,7 +1,4 @@ package teams -import ( - "errors" -) // **Deprecated**. The permission that new repositories will be added to the team with when none is specified. type TeamsPostRequestBody_permission int @@ -21,7 +18,7 @@ func ParseTeamsPostRequestBody_permission(v string) (any, error) { case "push": result = PUSH_TEAMSPOSTREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown TeamsPostRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go b/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go index dbe24fd8..7ef93527 100644 --- a/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go +++ b/pkg/github/orgs/item/teams/teams_post_request_body_privacy.go @@ -1,7 +1,4 @@ package teams -import ( - "errors" -) // The level of privacy this team should have. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. Default: `secret` **For a parent or child team:** * `closed` - visible to all members of this organization. Default for child team: `closed` type TeamsPostRequestBody_privacy int @@ -21,7 +18,7 @@ func ParseTeamsPostRequestBody_privacy(v string) (any, error) { case "closed": result = CLOSED_TEAMSPOSTREQUESTBODY_PRIVACY default: - return 0, errors.New("Unknown TeamsPostRequestBody_privacy value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go b/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go index f171af42..7d3f2596 100644 --- a/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go +++ b/pkg/github/orgs/item/with_org_patch_request_body_default_repository_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Default permission level members have for organization repositories. type WithOrgPatchRequestBody_default_repository_permission int @@ -27,7 +24,7 @@ func ParseWithOrgPatchRequestBody_default_repository_permission(v string) (any, case "none": result = NONE_WITHORGPATCHREQUESTBODY_DEFAULT_REPOSITORY_PERMISSION default: - return 0, errors.New("Unknown WithOrgPatchRequestBody_default_repository_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go b/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go index d7c2d5c1..35713013 100644 --- a/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go +++ b/pkg/github/orgs/item/with_org_patch_request_body_members_allowed_repository_creation_type.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. type WithOrgPatchRequestBody_members_allowed_repository_creation_type int @@ -24,7 +21,7 @@ func ParseWithOrgPatchRequestBody_members_allowed_repository_creation_type(v str case "none": result = NONE_WITHORGPATCHREQUESTBODY_MEMBERS_ALLOWED_REPOSITORY_CREATION_TYPE default: - return 0, errors.New("Unknown WithOrgPatchRequestBody_members_allowed_repository_creation_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/orgs/item_invitations_request_builder.go b/pkg/github/orgs/item_invitations_request_builder.go index fe97275d..2fd58d81 100644 --- a/pkg/github/orgs/item_invitations_request_builder.go +++ b/pkg/github/orgs/item_invitations_request_builder.go @@ -12,7 +12,7 @@ import ( type ItemInvitationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemInvitationsRequestBuilderGetQueryParameters the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. +// ItemInvitationsRequestBuilderGetQueryParameters the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. type ItemInvitationsRequestBuilderGetQueryParameters struct { // Filter invitations by their invitation source. Invitation_source *i2378633937c404127ad778eb05effbea7eb08f994ef028254c5d6c9a80ce3266.GetInvitation_sourceQueryParameterType `uriparametername:"invitation_source"` @@ -46,7 +46,7 @@ func NewItemInvitationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemInvitationsRequestBuilderInternal(urlParams, requestAdapter) } -// Get the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. +// Get the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. // returns a []OrganizationInvitationable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -72,7 +72,7 @@ func (m *ItemInvitationsRequestBuilder) Get(ctx context.Context, requestConfigur } return val, nil } -// Post invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// Post invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a OrganizationInvitationable when successful // returns a BasicError error when the service returns a 404 status code // returns a ValidationError error when the service returns a 422 status code @@ -97,7 +97,7 @@ func (m *ItemInvitationsRequestBuilder) Post(ctx context.Context, body ItemInvit } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrganizationInvitationable), nil } -// ToGetRequestInformation the return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. +// ToGetRequestInformation the return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. // returns a *RequestInformation when successful func (m *ItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInvitationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -105,7 +105,7 @@ func (m *ItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// ToPostRequestInformation invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemInvitationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemInvitationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go index 1fce1e55..711e48a0 100644 --- a/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go @@ -66,7 +66,7 @@ func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) Get(ctx context.Con } return val, nil } -// Post creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Post creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a TeamDiscussionCommentable when successful // [API method documentation] // @@ -93,7 +93,7 @@ func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// ToPostRequestInformation creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_teams_item_discussions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_request_builder.go index 07fd7960..ca96147d 100644 --- a/pkg/github/orgs/item_teams_item_discussions_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_request_builder.go @@ -68,7 +68,7 @@ func (m *ItemTeamsItemDiscussionsRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// Post creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Post creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a TeamDiscussionable when successful // [API method documentation] // @@ -95,7 +95,7 @@ func (m *ItemTeamsItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// ToPostRequestInformation creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go b/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go index c89a3afc..d132cf53 100644 --- a/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go +++ b/pkg/github/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go @@ -38,7 +38,7 @@ func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) Delete(ctx context.Co } return nil } -// Get checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// Get checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. // returns a TeamRepositoryable when successful // [API method documentation] // @@ -79,7 +79,7 @@ func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToDeleteRequestInform i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// ToGetRequestInformation checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. // returns a *RequestInformation when successful func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index 20315215..e4a68c1b 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -271,11 +271,6 @@ func (m *WithOrgItemRequestBuilder) SecurityManagers()(*ItemSecurityManagersRequ func (m *WithOrgItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Team the team property -// returns a *ItemTeamRequestBuilder when successful -func (m *WithOrgItemRequestBuilder) Team()(*ItemTeamRequestBuilder) { - return NewItemTeamRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // Teams the teams property // returns a *ItemTeamsRequestBuilder when successful func (m *WithOrgItemRequestBuilder) Teams()(*ItemTeamsRequestBuilder) { diff --git a/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go b/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go index cf17922e..5eedb54d 100644 --- a/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go +++ b/pkg/github/projects/columns/item/cards/get_archived_state_query_parameter_type.go @@ -1,7 +1,4 @@ package cards -import ( - "errors" -) type GetArchived_stateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetArchived_stateQueryParameterType(v string) (any, error) { case "not_archived": result = NOT_ARCHIVED_GETARCHIVED_STATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetArchived_stateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go b/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go index 6d93c8ba..b4840b8d 100644 --- a/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go +++ b/pkg/github/projects/item/collaborators/get_affiliation_query_parameter_type.go @@ -1,7 +1,4 @@ package collaborators -import ( - "errors" -) type GetAffiliationQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetAffiliationQueryParameterType(v string) (any, error) { case "all": result = ALL_GETAFFILIATIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetAffiliationQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go b/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go index 6670acf6..e9c5ff5a 100644 --- a/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go +++ b/pkg/github/projects/item/collaborators/item/with_username_put_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The permission to grant the collaborator. type WithUsernamePutRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithUsernamePutRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHUSERNAMEPUTREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithUsernamePutRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go b/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go index 727281af..27c80d6d 100644 --- a/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go +++ b/pkg/github/projects/item/with_project_patch_request_body_organization_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The baseline permission that all organization members have on this project type WithProject_PatchRequestBody_organization_permission int @@ -27,7 +24,7 @@ func ParseWithProject_PatchRequestBody_organization_permission(v string) (any, e case "none": result = NONE_WITHPROJECT_PATCHREQUESTBODY_ORGANIZATION_PERMISSION default: - return 0, errors.New("Unknown WithProject_PatchRequestBody_organization_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/rate_limit/rate_limit_request_builder.go b/pkg/github/rate_limit/rate_limit_request_builder.go index b05bf46f..eaa8259b 100644 --- a/pkg/github/rate_limit/rate_limit_request_builder.go +++ b/pkg/github/rate_limit/rate_limit_request_builder.go @@ -23,7 +23,7 @@ func NewRate_limitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263 urlParams["request-raw-url"] = rawUrl return NewRate_limitRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/overview/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. +// Get **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. // returns a RateLimitOverviewable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -46,7 +46,7 @@ func (m *Rate_limitRequestBuilder) Get(ctx context.Context, requestConfiguration } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RateLimitOverviewable), nil } -// ToGetRequestInformation **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/overview/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. +// ToGetRequestInformation **Note:** Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)."**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. // returns a *RequestInformation when successful func (m *Rate_limitRequestBuilder) 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/actions/caches/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go index 816d21f4..ce5c64a9 100644 --- a/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/actions/caches/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package caches -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go index f259bd0b..85075674 100644 --- a/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/actions/caches/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package caches -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "size_in_bytes": result = SIZE_IN_BYTES_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go b/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go index 651b8b5c..701adba1 100644 --- a/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go +++ b/pkg/github/repos/item/item/actions/runs/get_status_query_parameter_type.go @@ -1,7 +1,4 @@ package runs -import ( - "errors" -) type GetStatusQueryParameterType int const ( @@ -56,7 +53,7 @@ func ParseGetStatusQueryParameterType(v string) (any, error) { case "pending": result = PENDING_GETSTATUSQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go index e943e7ed..b1a10d22 100644 --- a/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go +++ b/pkg/github/repos/item/item/actions/runs/item/jobs/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package jobs -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go b/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go index 2a4bca19..1a1cbf45 100644 --- a/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go +++ b/pkg/github/repos/item/item/actions/runs/item/pending_deployments/pending_deployments_post_request_body_state.go @@ -1,7 +1,4 @@ package pending_deployments -import ( - "errors" -) // Whether to approve or reject deployment to the specified environments. type Pending_deploymentsPostRequestBody_state int @@ -21,7 +18,7 @@ func ParsePending_deploymentsPostRequestBody_state(v string) (any, error) { case "rejected": result = REJECTED_PENDING_DEPLOYMENTSPOSTREQUESTBODY_STATE default: - return 0, errors.New("Unknown Pending_deploymentsPostRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go b/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go index 651b8b5c..701adba1 100644 --- a/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go +++ b/pkg/github/repos/item/item/actions/workflows/item/runs/get_status_query_parameter_type.go @@ -1,7 +1,4 @@ package runs -import ( - "errors" -) type GetStatusQueryParameterType int const ( @@ -56,7 +53,7 @@ func ParseGetStatusQueryParameterType(v string) (any, error) { case "pending": result = PENDING_GETSTATUSQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go index ac8a49ac..928f20f1 100644 --- a/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go +++ b/pkg/github/repos/item/item/activity/get_activity_type_query_parameter_type.go @@ -1,7 +1,4 @@ package activity -import ( - "errors" -) type GetActivity_typeQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetActivity_typeQueryParameterType(v string) (any, error) { case "merge_queue_merge": result = MERGE_QUEUE_MERGE_GETACTIVITY_TYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetActivity_typeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go index bac81da9..33689c97 100644 --- a/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/activity/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package activity -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go b/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go index abb4d65b..f44010c0 100644 --- a/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go +++ b/pkg/github/repos/item/item/activity/get_time_period_query_parameter_type.go @@ -1,7 +1,4 @@ package activity -import ( - "errors" -) type GetTime_periodQueryParameterType int const ( @@ -29,7 +26,7 @@ func ParseGetTime_periodQueryParameterType(v string) (any, error) { case "year": result = YEAR_GETTIME_PERIODQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go index a8ca89fd..9ee18385 100644 --- a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go +++ b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member1_status.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type CheckRunsPostRequestBodyMember1_status int const ( @@ -17,7 +14,7 @@ func ParseCheckRunsPostRequestBodyMember1_status(v string) (any, error) { case "completed": result = COMPLETED_CHECKRUNSPOSTREQUESTBODYMEMBER1_STATUS default: - return 0, errors.New("Unknown CheckRunsPostRequestBodyMember1_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go index e38b6d75..1bdf3890 100644 --- a/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go +++ b/pkg/github/repos/item/item/checkruns/check_runs_post_request_body_member2_status.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type CheckRunsPostRequestBodyMember2_status int const ( @@ -20,7 +17,7 @@ func ParseCheckRunsPostRequestBodyMember2_status(v string) (any, error) { case "in_progress": result = IN_PROGRESS_CHECKRUNSPOSTREQUESTBODYMEMBER2_STATUS default: - return 0, errors.New("Unknown CheckRunsPostRequestBodyMember2_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go index 0bddff4a..4d59d916 100644 --- a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go +++ b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member1_status.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) type WithCheck_run_PatchRequestBodyMember1_status int const ( @@ -17,7 +14,7 @@ func ParseWithCheck_run_PatchRequestBodyMember1_status(v string) (any, error) { case "completed": result = COMPLETED_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER1_STATUS default: - return 0, errors.New("Unknown WithCheck_run_PatchRequestBodyMember1_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go index 8e0fe399..0c6a0e07 100644 --- a/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go +++ b/pkg/github/repos/item/item/checkruns/item/with_check_run_patch_request_body_member2_status.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) type WithCheck_run_PatchRequestBodyMember2_status int const ( @@ -20,7 +17,7 @@ func ParseWithCheck_run_PatchRequestBodyMember2_status(v string) (any, error) { case "in_progress": result = IN_PROGRESS_WITHCHECK_RUN_PATCHREQUESTBODYMEMBER2_STATUS default: - return 0, errors.New("Unknown WithCheck_run_PatchRequestBodyMember2_status value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go index f6486461..6cab081f 100644 --- a/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go +++ b/pkg/github/repos/item/item/checksuites/item/checkruns/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go b/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go index 9bc3caba..895d452b 100644 --- a/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go +++ b/pkg/github/repos/item/item/checksuites/item/checkruns/get_status_query_parameter_type.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type GetStatusQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStatusQueryParameterType(v string) (any, error) { case "completed": result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/codescanning/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/codescanning/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go index f7f659c0..a6995a73 100644 --- a/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/codescanning/analyses/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package analyses -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go index c937f78d..d6c55314 100644 --- a/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/codescanning/analyses/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package analyses -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -17,7 +14,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "created": result = CREATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go b/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go index 2a4909fb..98108e2c 100644 --- a/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go +++ b/pkg/github/repos/item/item/codespaces/codespaces_post_request_body_geo.go @@ -1,7 +1,4 @@ package codespaces -import ( - "errors" -) // The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. type CodespacesPostRequestBody_geo int @@ -27,7 +24,7 @@ func ParseCodespacesPostRequestBody_geo(v string) (any, error) { case "UsWest": result = USWEST_CODESPACESPOSTREQUESTBODY_GEO default: - return 0, errors.New("Unknown CodespacesPostRequestBody_geo value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go b/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go index 6d93c8ba..b4840b8d 100644 --- a/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go +++ b/pkg/github/repos/item/item/collaborators/get_affiliation_query_parameter_type.go @@ -1,7 +1,4 @@ package collaborators -import ( - "errors" -) type GetAffiliationQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetAffiliationQueryParameterType(v string) (any, error) { case "all": result = ALL_GETAFFILIATIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetAffiliationQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go b/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go index d53dfc64..90dc54a8 100644 --- a/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go +++ b/pkg/github/repos/item/item/collaborators/get_permission_query_parameter_type.go @@ -1,7 +1,4 @@ package collaborators -import ( - "errors" -) type GetPermissionQueryParameterType int const ( @@ -29,7 +26,7 @@ func ParseGetPermissionQueryParameterType(v string) (any, error) { case "admin": result = ADMIN_GETPERMISSIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPermissionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/repos/item/item/comments/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go index e4c89a19..dc8239cf 100644 --- a/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/repos/item/item/comments/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go b/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go index f6486461..6cab081f 100644 --- a/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go +++ b/pkg/github/repos/item/item/commits/item/checkruns/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go b/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go index 9bc3caba..895d452b 100644 --- a/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go +++ b/pkg/github/repos/item/item/commits/item/checkruns/get_status_query_parameter_type.go @@ -1,7 +1,4 @@ package checkruns -import ( - "errors" -) type GetStatusQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStatusQueryParameterType(v string) (any, error) { case "completed": result = COMPLETED_GETSTATUSQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStatusQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/dependabot/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go index 906bdb78..5d3e9a31 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go +++ b/pkg/github/repos/item/item/dependabot/alerts/get_scope_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetScopeQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetScopeQueryParameterType(v string) (any, error) { case "runtime": result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go index 8418fe5a..caad02d7 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go +++ b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_dismissed_reason.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // **Required when `state` is `dismissed`.** A reason for dismissing the alert. type WithAlert_numberPatchRequestBody_dismissed_reason int @@ -30,7 +27,7 @@ func ParseWithAlert_numberPatchRequestBody_dismissed_reason(v string) (any, erro case "tolerable_risk": result = TOLERABLE_RISK_WITHALERT_NUMBERPATCHREQUESTBODY_DISMISSED_REASON default: - return 0, errors.New("Unknown WithAlert_numberPatchRequestBody_dismissed_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go index 5815b207..54cbbe8b 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go +++ b/pkg/github/repos/item/item/dependabot/alerts/item/with_alert_number_patch_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The state of the Dependabot alert.A `dismissed_reason` must be provided when setting the state to `dismissed`. type WithAlert_numberPatchRequestBody_state int @@ -21,7 +18,7 @@ func ParseWithAlert_numberPatchRequestBody_state(v string) (any, error) { case "open": result = OPEN_WITHALERT_NUMBERPATCHREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithAlert_numberPatchRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go b/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go index 3c776640..18bc5c88 100644 --- a/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go +++ b/pkg/github/repos/item/item/deployments/item/statuses/statuses_post_request_body_state.go @@ -1,7 +1,4 @@ package statuses -import ( - "errors" -) // The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. type StatusesPostRequestBody_state int @@ -36,7 +33,7 @@ func ParseStatusesPostRequestBody_state(v string) (any, error) { case "success": result = SUCCESS_STATUSESPOSTREQUESTBODY_STATE default: - return 0, errors.New("Unknown StatusesPostRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go index 238f6740..9ca668e4 100644 --- a/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/forks/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package forks -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "watchers": result = WATCHERS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go b/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go index 074ff8ad..d4ef1483 100644 --- a/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go +++ b/pkg/github/repos/item/item/git/tags/tags_post_request_body_type.go @@ -1,7 +1,4 @@ package tags -import ( - "errors" -) // The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. type TagsPostRequestBody_type int @@ -24,7 +21,7 @@ func ParseTagsPostRequestBody_type(v string) (any, error) { case "blob": result = BLOB_TAGSPOSTREQUESTBODY_TYPE default: - return 0, errors.New("Unknown TagsPostRequestBody_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go index f395936f..389f0fe6 100644 --- a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go +++ b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_mode.go @@ -1,7 +1,4 @@ package trees -import ( - "errors" -) // The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. type TreesPostRequestBody_tree_mode int @@ -30,7 +27,7 @@ func ParseTreesPostRequestBody_tree_mode(v string) (any, error) { case "120000": result = ONETWOZEROZEROZEROZERO_TREESPOSTREQUESTBODY_TREE_MODE default: - return 0, errors.New("Unknown TreesPostRequestBody_tree_mode value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go index f30fd97f..ff3383e2 100644 --- a/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go +++ b/pkg/github/repos/item/item/git/trees/trees_post_request_body_tree_type.go @@ -1,7 +1,4 @@ package trees -import ( - "errors" -) // Either `blob`, `tree`, or `commit`. type TreesPostRequestBody_tree_type int @@ -24,7 +21,7 @@ func ParseTreesPostRequestBody_tree_type(v string) (any, error) { case "commit": result = COMMIT_TREESPOSTREQUESTBODY_TREE_TYPE default: - return 0, errors.New("Unknown TreesPostRequestBody_tree_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go b/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go index d6411ed3..7fe0d56f 100644 --- a/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go +++ b/pkg/github/repos/item/item/importescaped/import_patch_request_body_vcs.go @@ -1,7 +1,4 @@ package importescaped -import ( - "errors" -) // The type of version control system you are migrating from. type ImportPatchRequestBody_vcs int @@ -27,7 +24,7 @@ func ParseImportPatchRequestBody_vcs(v string) (any, error) { case "mercurial": result = MERCURIAL_IMPORTPATCHREQUESTBODY_VCS default: - return 0, errors.New("Unknown ImportPatchRequestBody_vcs value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go b/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go index aa419fbc..72771edb 100644 --- a/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go +++ b/pkg/github/repos/item/item/importescaped/import_put_request_body_vcs.go @@ -1,7 +1,4 @@ package importescaped -import ( - "errors" -) // The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. type ImportPutRequestBody_vcs int @@ -27,7 +24,7 @@ func ParseImportPutRequestBody_vcs(v string) (any, error) { case "tfvc": result = TFVC_IMPORTPUTREQUESTBODY_VCS default: - return 0, errors.New("Unknown ImportPutRequestBody_vcs value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go b/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go index f7db76e8..8227c695 100644 --- a/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go +++ b/pkg/github/repos/item/item/importescaped/lfs/lfs_patch_request_body_use_lfs.go @@ -1,7 +1,4 @@ package lfs -import ( - "errors" -) // Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. type LfsPatchRequestBody_use_lfs int @@ -21,7 +18,7 @@ func ParseLfsPatchRequestBody_use_lfs(v string) (any, error) { case "opt_out": result = OPT_OUT_LFSPATCHREQUESTBODY_USE_LFS default: - return 0, errors.New("Unknown LfsPatchRequestBody_use_lfs value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go b/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go index bae8cdad..f72b677b 100644 --- a/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go +++ b/pkg/github/repos/item/item/invitations/item/with_invitation_patch_request_body_permissions.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. type WithInvitation_PatchRequestBody_permissions int @@ -30,7 +27,7 @@ func ParseWithInvitation_PatchRequestBody_permissions(v string) (any, error) { case "admin": result = ADMIN_WITHINVITATION_PATCHREQUESTBODY_PERMISSIONS default: - return 0, errors.New("Unknown WithInvitation_PatchRequestBody_permissions value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go index ac255063..6561eb6a 100644 --- a/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/comments/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go index 4ccff65f..34ad7acd 100644 --- a/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/comments/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/comments/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go index a3fa5533..3cae5db8 100644 --- a/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/repos/item/item/issues/comments/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go index 6aca6ecb..f176c1cc 100644 --- a/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go index ba962acf..10b7912a 100644 --- a/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "comments": result = COMMENTS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go b/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go index 55415107..065faf93 100644 --- a/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go b/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go index 5194ffe0..64e085f3 100644 --- a/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go +++ b/pkg/github/repos/item/item/issues/item/lock/lock_put_request_body_lock_reason.go @@ -1,7 +1,4 @@ package lock -import ( - "errors" -) // The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: * `off-topic` * `too heated` * `resolved` * `spam` type LockPutRequestBody_lock_reason int @@ -27,7 +24,7 @@ func ParseLockPutRequestBody_lock_reason(v string) (any, error) { case "spam": result = SPAM_LOCKPUTREQUESTBODY_LOCK_REASON default: - return 0, errors.New("Unknown LockPutRequestBody_lock_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/repos/item/item/issues/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go index e37c3b8b..ddf63af3 100644 --- a/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/repos/item/item/issues/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go index c9bdc837..69e63ff5 100644 --- a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go +++ b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The open or closed state of the issue. type WithIssue_numberPatchRequestBody_state int @@ -21,7 +18,7 @@ func ParseWithIssue_numberPatchRequestBody_state(v string) (any, error) { case "closed": result = CLOSED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithIssue_numberPatchRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go index f28bc409..7c6b63b0 100644 --- a/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go +++ b/pkg/github/repos/item/item/issues/item/with_issue_number_patch_request_body_state_reason.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The reason for the state change. Ignored unless `state` is changed. type WithIssue_numberPatchRequestBody_state_reason int @@ -24,7 +21,7 @@ func ParseWithIssue_numberPatchRequestBody_state_reason(v string) (any, error) { case "reopened": result = REOPENED_WITHISSUE_NUMBERPATCHREQUESTBODY_STATE_REASON default: - return 0, errors.New("Unknown WithIssue_numberPatchRequestBody_state_reason value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go index b041b3a5..e719f3b6 100644 --- a/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/milestones/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package milestones -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go index 4d690775..038a8e8d 100644 --- a/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/milestones/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package milestones -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "completeness": result = COMPLETENESS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go b/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go index 11bfb719..7519c97f 100644 --- a/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/milestones/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package milestones -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go b/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go index 042f6d77..7a67c0df 100644 --- a/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go +++ b/pkg/github/repos/item/item/milestones/item/with_milestone_number_patch_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The state of the milestone. Either `open` or `closed`. type WithMilestone_numberPatchRequestBody_state int @@ -21,7 +18,7 @@ func ParseWithMilestone_numberPatchRequestBody_state(v string) (any, error) { case "closed": result = CLOSED_WITHMILESTONE_NUMBERPATCHREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithMilestone_numberPatchRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go b/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go index 09bc8540..f05193ed 100644 --- a/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go +++ b/pkg/github/repos/item/item/milestones/milestones_post_request_body_state.go @@ -1,7 +1,4 @@ package milestones -import ( - "errors" -) // The state of the milestone. Either `open` or `closed`. type MilestonesPostRequestBody_state int @@ -21,7 +18,7 @@ func ParseMilestonesPostRequestBody_state(v string) (any, error) { case "closed": result = CLOSED_MILESTONESPOSTREQUESTBODY_STATE default: - return 0, errors.New("Unknown MilestonesPostRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go b/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go index 8c56b3ce..914ccf8c 100644 --- a/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go +++ b/pkg/github/repos/item/item/pages/pages_post_request_body_build_type.go @@ -1,7 +1,4 @@ package pages -import ( - "errors" -) // The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. type PagesPostRequestBody_build_type int @@ -21,7 +18,7 @@ func ParsePagesPostRequestBody_build_type(v string) (any, error) { case "workflow": result = WORKFLOW_PAGESPOSTREQUESTBODY_BUILD_TYPE default: - return 0, errors.New("Unknown PagesPostRequestBody_build_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go b/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go index a5f415ec..cb6fcbee 100644 --- a/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go +++ b/pkg/github/repos/item/item/pages/pages_post_request_body_source_path.go @@ -1,7 +1,4 @@ package pages -import ( - "errors" -) // The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` type PagesPostRequestBody_source_path int @@ -21,7 +18,7 @@ func ParsePagesPostRequestBody_source_path(v string) (any, error) { case "/docs": result = DOCS_PAGESPOSTREQUESTBODY_SOURCE_PATH default: - return 0, errors.New("Unknown PagesPostRequestBody_source_path value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go b/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go index 737c6d03..163d12cc 100644 --- a/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go +++ b/pkg/github/repos/item/item/pages/pages_put_request_body_build_type.go @@ -1,7 +1,4 @@ package pages -import ( - "errors" -) // The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. type PagesPutRequestBody_build_type int @@ -21,7 +18,7 @@ func ParsePagesPutRequestBody_build_type(v string) (any, error) { case "workflow": result = WORKFLOW_PAGESPUTREQUESTBODY_BUILD_TYPE default: - return 0, errors.New("Unknown PagesPutRequestBody_build_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go b/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go index c4c4c6ef..402c5ce1 100644 --- a/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go +++ b/pkg/github/repos/item/item/pages/pages_put_request_body_source_member1_path.go @@ -1,7 +1,4 @@ package pages -import ( - "errors" -) // The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. type PagesPutRequestBody_sourceMember1_path int @@ -21,7 +18,7 @@ func ParsePagesPutRequestBody_sourceMember1_path(v string) (any, error) { case "/docs": result = DOCS_PAGESPUTREQUESTBODY_SOURCEMEMBER1_PATH default: - return 0, errors.New("Unknown PagesPutRequestBody_sourceMember1_path value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go b/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go index 985374b5..2c9bc230 100644 --- a/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/projects/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package projects -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go index ac255063..6561eb6a 100644 --- a/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/comments/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go index d29bef7c..75f87778 100644 --- a/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/comments/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "created_at": result = CREATED_AT_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/comments/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go index 60537c68..388901bc 100644 --- a/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/repos/item/item/pulls/comments/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go index f9e2cd95..5747f491 100644 --- a/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package pulls -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go index 52775324..b32896c8 100644 --- a/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package pulls -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "long-running": result = LONGRUNNING_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go b/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go index b23e0318..0597a61a 100644 --- a/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package pulls -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go b/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go index 2a4909fb..98108e2c 100644 --- a/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go +++ b/pkg/github/repos/item/item/pulls/item/codespaces/codespaces_post_request_body_geo.go @@ -1,7 +1,4 @@ package codespaces -import ( - "errors" -) // The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. type CodespacesPostRequestBody_geo int @@ -27,7 +24,7 @@ func ParseCodespacesPostRequestBody_geo(v string) (any, error) { case "UsWest": result = USWEST_CODESPACESPOSTREQUESTBODY_GEO default: - return 0, errors.New("Unknown CodespacesPostRequestBody_geo value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go index 57e4170b..6f8c6121 100644 --- a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_side.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) // In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. type CommentsPostRequestBody_side int @@ -21,7 +18,7 @@ func ParseCommentsPostRequestBody_side(v string) (any, error) { case "RIGHT": result = RIGHT_COMMENTSPOSTREQUESTBODY_SIDE default: - return 0, errors.New("Unknown CommentsPostRequestBody_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go index 09c2c005..5ce2efc8 100644 --- a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_start_side.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) // **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. type CommentsPostRequestBody_start_side int @@ -24,7 +21,7 @@ func ParseCommentsPostRequestBody_start_side(v string) (any, error) { case "side": result = SIDE_COMMENTSPOSTREQUESTBODY_START_SIDE default: - return 0, errors.New("Unknown CommentsPostRequestBody_start_side value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go index b7b643a2..b9077a6b 100644 --- a/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go +++ b/pkg/github/repos/item/item/pulls/item/comments/comments_post_request_body_subject_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) // The level at which the comment is targeted. type CommentsPostRequestBody_subject_type int @@ -21,7 +18,7 @@ func ParseCommentsPostRequestBody_subject_type(v string) (any, error) { case "file": result = FILE_COMMENTSPOSTREQUESTBODY_SUBJECT_TYPE default: - return 0, errors.New("Unknown CommentsPostRequestBody_subject_type value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go index ac255063..6561eb6a 100644 --- a/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/item/comments/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go index 4ccff65f..34ad7acd 100644 --- a/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/pulls/item/comments/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go b/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go index 9863cc0f..552f913a 100644 --- a/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go +++ b/pkg/github/repos/item/item/pulls/item/merge/merge_put_request_body_merge_method.go @@ -1,7 +1,4 @@ package merge -import ( - "errors" -) // The merge method to use. type MergePutRequestBody_merge_method int @@ -24,7 +21,7 @@ func ParseMergePutRequestBody_merge_method(v string) (any, error) { case "rebase": result = REBASE_MERGEPUTREQUESTBODY_MERGE_METHOD default: - return 0, errors.New("Unknown MergePutRequestBody_merge_method value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go index b2c73be5..c02df651 100644 --- a/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go +++ b/pkg/github/repos/item/item/pulls/item/reviews/item/dismissals/dismissals_put_request_body_event.go @@ -1,7 +1,4 @@ package dismissals -import ( - "errors" -) type DismissalsPutRequestBody_event int const ( @@ -17,7 +14,7 @@ func ParseDismissalsPutRequestBody_event(v string) (any, error) { case "DISMISS": result = DISMISS_DISMISSALSPUTREQUESTBODY_EVENT default: - return 0, errors.New("Unknown DismissalsPutRequestBody_event value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go index 245ec63b..53b26d8d 100644 --- a/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go +++ b/pkg/github/repos/item/item/pulls/item/reviews/item/events/events_post_request_body_event.go @@ -1,7 +1,4 @@ package events -import ( - "errors" -) // The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. type EventsPostRequestBody_event int @@ -24,7 +21,7 @@ func ParseEventsPostRequestBody_event(v string) (any, error) { case "COMMENT": result = COMMENT_EVENTSPOSTREQUESTBODY_EVENT default: - return 0, errors.New("Unknown EventsPostRequestBody_event value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go b/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go index b3f9986c..d855e813 100644 --- a/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go +++ b/pkg/github/repos/item/item/pulls/item/reviews/reviews_post_request_body_event.go @@ -1,7 +1,4 @@ package reviews -import ( - "errors" -) // The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. type ReviewsPostRequestBody_event int @@ -24,7 +21,7 @@ func ParseReviewsPostRequestBody_event(v string) (any, error) { case "COMMENT": result = COMMENT_REVIEWSPOSTREQUESTBODY_EVENT default: - return 0, errors.New("Unknown ReviewsPostRequestBody_event value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go b/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go index 802b2f7e..a78a3850 100644 --- a/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go +++ b/pkg/github/repos/item/item/pulls/item/with_pull_number_patch_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // State of this Pull Request. Either `open` or `closed`. type WithPull_numberPatchRequestBody_state int @@ -21,7 +18,7 @@ func ParseWithPull_numberPatchRequestBody_state(v string) (any, error) { case "closed": result = CLOSED_WITHPULL_NUMBERPATCHREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithPull_numberPatchRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go b/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go index 5405ea22..15c4c7e1 100644 --- a/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/repos/item/item/releases/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go b/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go index d58288b1..aa1f1917 100644 --- a/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/repos/item/item/releases/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. type ReactionsPostRequestBody_content int @@ -33,7 +30,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go b/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go index cf78c148..53ef3fa4 100644 --- a/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go +++ b/pkg/github/repos/item/item/releases/item/with_release_patch_request_body_make_latest.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. type WithRelease_PatchRequestBody_make_latest int @@ -24,7 +21,7 @@ func ParseWithRelease_PatchRequestBody_make_latest(v string) (any, error) { case "legacy": result = LEGACY_WITHRELEASE_PATCHREQUESTBODY_MAKE_LATEST default: - return 0, errors.New("Unknown WithRelease_PatchRequestBody_make_latest value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go b/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go index a76754fb..c2b56d8b 100644 --- a/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go +++ b/pkg/github/repos/item/item/releases/releases_post_request_body_make_latest.go @@ -1,7 +1,4 @@ package releases -import ( - "errors" -) // Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. type ReleasesPostRequestBody_make_latest int @@ -24,7 +21,7 @@ func ParseReleasesPostRequestBody_make_latest(v string) (any, error) { case "legacy": result = LEGACY_RELEASESPOSTREQUESTBODY_MAKE_LATEST default: - return 0, errors.New("Unknown ReleasesPostRequestBody_make_latest value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go index 8349a799..d5e2d191 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_message.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type RepoPatchRequestBody_merge_commit_message int @@ -24,7 +21,7 @@ func ParseRepoPatchRequestBody_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go index 95b5c343..f0381ceb 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_merge_commit_title.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type RepoPatchRequestBody_merge_commit_title int @@ -21,7 +18,7 @@ func ParseRepoPatchRequestBody_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go index 0f0d7e93..8a96cc65 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type RepoPatchRequestBody_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseRepoPatchRequestBody_squash_merge_commit_message(v string) (any, error case "BLANK": result = BLANK_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go index 6108d856..d9dc7cc5 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type RepoPatchRequestBody_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseRepoPatchRequestBody_squash_merge_commit_title(v string) (any, error) case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/repo_patch_request_body_visibility.go b/pkg/github/repos/item/item/repo_patch_request_body_visibility.go index b741c1b9..85721e15 100644 --- a/pkg/github/repos/item/item/repo_patch_request_body_visibility.go +++ b/pkg/github/repos/item/item/repo_patch_request_body_visibility.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The visibility of the repository. type RepoPatchRequestBody_visibility int @@ -21,7 +18,7 @@ func ParseRepoPatchRequestBody_visibility(v string) (any, error) { case "private": result = PRIVATE_REPOPATCHREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown RepoPatchRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go index 2e18033f..d4c79d20 100644 --- a/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go +++ b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type WithRuleset_PutRequestBody_target int @@ -24,7 +21,7 @@ func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { case "push": result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET default: - return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go index 210257c5..a35713d6 100644 --- a/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go +++ b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go @@ -1,7 +1,4 @@ package rulesets -import ( - "errors" -) // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RulesetsPostRequestBody_target int @@ -24,7 +21,7 @@ func ParseRulesetsPostRequestBody_target(v string) (any, error) { case "push": result = PUSH_RULESETSPOSTREQUESTBODY_TARGET default: - return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go b/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go index 91a669a6..8665bcb0 100644 --- a/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go +++ b/pkg/github/repos/item/item/rulesets/rulesuites/get_rule_suite_result_query_parameter_type.go @@ -1,7 +1,4 @@ package rulesuites -import ( - "errors" -) type GetRule_suite_resultQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetRule_suite_resultQueryParameterType(v string) (any, error) { case "all": result = ALL_GETRULE_SUITE_RESULTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRule_suite_resultQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go b/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go index 82dfab2d..ae408634 100644 --- a/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go +++ b/pkg/github/repos/item/item/rulesets/rulesuites/get_time_period_query_parameter_type.go @@ -1,7 +1,4 @@ package rulesuites -import ( - "errors" -) type GetTime_periodQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetTime_periodQueryParameterType(v string) (any, error) { case "month": result = MONTH_GETTIME_PERIODQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTime_periodQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go index 70606a8d..0606c6d4 100644 --- a/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go index bc094eda..719c5fb3 100644 --- a/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go b/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go index 382957f5..ae552fb1 100644 --- a/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/secretscanning/alerts/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package alerts -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "resolved": result = RESOLVED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go index 41aa1584..68510508 100644 --- a/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go +++ b/pkg/github/repos/item/item/securityadvisories/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go index 93822450..cd214218 100644 --- a/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/securityadvisories/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "published": result = PUBLISHED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go b/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go index 4f106c12..910881dd 100644 --- a/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go +++ b/pkg/github/repos/item/item/securityadvisories/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package securityadvisories -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "closed": result = CLOSED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go b/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go index 433b01d0..9dfb1f70 100644 --- a/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go +++ b/pkg/github/repos/item/item/statuses/item/with_sha_post_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The state of the status. type WithShaPostRequestBody_state int @@ -27,7 +24,7 @@ func ParseWithShaPostRequestBody_state(v string) (any, error) { case "success": result = SUCCESS_WITHSHAPOSTREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithShaPostRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go b/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go index d69029ae..0b11ac17 100644 --- a/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go +++ b/pkg/github/repos/item/item/traffic/clones/get_per_query_parameter_type.go @@ -1,7 +1,4 @@ package clones -import ( - "errors" -) type GetPerQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetPerQueryParameterType(v string) (any, error) { case "week": result = WEEK_GETPERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPerQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go b/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go index 4816ad8f..6a9fd6be 100644 --- a/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go +++ b/pkg/github/repos/item/item/traffic/views/get_per_query_parameter_type.go @@ -1,7 +1,4 @@ package views -import ( - "errors" -) type GetPerQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetPerQueryParameterType(v string) (any, error) { case "week": result = WEEK_GETPERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPerQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/repos/item_item_branches_request_builder.go b/pkg/github/repos/item_item_branches_request_builder.go index 3638e06f..e08e2fe9 100644 --- a/pkg/github/repos/item_item_branches_request_builder.go +++ b/pkg/github/repos/item_item_branches_request_builder.go @@ -16,7 +16,7 @@ type ItemItemBranchesRequestBuilderGetQueryParameters struct { Page *int32 `uriparametername:"page"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` - // Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + // Setting to `true` returns only branches protected by branch protections or rulesets. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. Protected *bool `uriparametername:"protected"` } // ByBranch gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.branches.item collection diff --git a/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go index 59f1a44c..9654cc21 100644 --- a/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go +++ b/pkg/github/repos/item_item_code_scanning_codeql_databases_with_language_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder(rawUrl urlParams["request-raw-url"] = rawUrl return NewItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// Get gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. // returns a CodeScanningCodeqlDatabaseable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -50,7 +50,7 @@ func (m *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) Get( } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningCodeqlDatabaseable), nil } -// ToGetRequestInformation gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// ToGetRequestInformation gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. // returns a *RequestInformation when successful func (m *ItemItemCodeScanningCodeqlDatabasesWithLanguageItemRequestBuilder) 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_code_scanning_codeql_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go index 511b4c03..3f287a49 100644 --- a/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go +++ b/pkg/github/repos/item_item_code_scanning_codeql_request_builder.go @@ -26,3 +26,8 @@ func NewItemItemCodeScanningCodeqlRequestBuilder(rawUrl string, requestAdapter i func (m *ItemItemCodeScanningCodeqlRequestBuilder) Databases()(*ItemItemCodeScanningCodeqlDatabasesRequestBuilder) { return NewItemItemCodeScanningCodeqlDatabasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// VariantAnalyses the variantAnalyses property +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlRequestBuilder) VariantAnalyses()(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go new file mode 100644 index 00000000..b509f15f --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_item_with_repo_name_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos\{repo_owner}\{repo_name} +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the analysis status of a repository in a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningVariantAnalysisRepoTaskable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningVariantAnalysisRepoTask503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/code-scanning/code-scanning#get-the-analysis-status-of-a-repository-in-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisRepoTaskable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysisRepoTask503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysisRepoTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisRepoTaskable), nil +} +// ToGetRequestInformation gets the analysis status of a repository in a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go new file mode 100644 index 00000000..8bc41cf5 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_owner gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) ByRepo_owner(repo_owner string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_owner != "" { + urlTplParams["repo_owner"] = repo_owner + } + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go new file mode 100644 index 00000000..4812e25f --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_item_repos_with_repo_owner_item_request_builder.go @@ -0,0 +1,35 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos\{repo_owner} +type ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByRepo_name gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) ByRepo_name(repo_name string)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if repo_name != "" { + urlTplParams["repo_name"] = repo_name + } + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposItemWithRepo_nameItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposWithRepo_ownerItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go new file mode 100644 index 00000000..640c0dc0 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_post_request_body.go @@ -0,0 +1,197 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody struct { + // The language targeted by the CodeQL query + language *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage + // A Base64-encoded tarball containing a CodeQL query and all its dependencies + query_pack *string + // List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repositories []string + // List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repository_lists []string + // List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. + repository_owners []string +} +// NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody()(*ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody{ + } + return m +} +// CreateItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ParseCodeScanningVariantAnalysisLanguage) + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val.(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage)) + } + return nil + } + res["query_pack"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryPack(val) + } + return nil + } + res["repositories"] = 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.SetRepositories(res) + } + return nil + } + res["repository_lists"] = 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.SetRepositoryLists(res) + } + return nil + } + res["repository_owners"] = 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.SetRepositoryOwners(res) + } + return nil + } + return res +} +// GetLanguage gets the language property value. The language targeted by the CodeQL query +// returns a *CodeScanningVariantAnalysisLanguage when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetLanguage()(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage) { + return m.language +} +// GetQueryPack gets the query_pack property value. A Base64-encoded tarball containing a CodeQL query and all its dependencies +// returns a *string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetQueryPack()(*string) { + return m.query_pack +} +// GetRepositories gets the repositories property value. List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositories()([]string) { + return m.repositories +} +// GetRepositoryLists gets the repository_lists property value. List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositoryLists()([]string) { + return m.repository_lists +} +// GetRepositoryOwners gets the repository_owners property value. List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +// returns a []string when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) GetRepositoryOwners()([]string) { + return m.repository_owners +} +// Serialize serializes information the current object +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLanguage() != nil { + cast := (*m.GetLanguage()).String() + err := writer.WriteStringValue("language", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("query_pack", m.GetQueryPack()) + if err != nil { + return err + } + } + if m.GetRepositories() != nil { + err := writer.WriteCollectionOfStringValues("repositories", m.GetRepositories()) + if err != nil { + return err + } + } + if m.GetRepositoryLists() != nil { + err := writer.WriteCollectionOfStringValues("repository_lists", m.GetRepositoryLists()) + if err != nil { + return err + } + } + if m.GetRepositoryOwners() != nil { + err := writer.WriteCollectionOfStringValues("repository_owners", m.GetRepositoryOwners()) + if err != nil { + return err + } + } + return nil +} +// SetLanguage sets the language property value. The language targeted by the CodeQL query +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetLanguage(value *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage)() { + m.language = value +} +// SetQueryPack sets the query_pack property value. A Base64-encoded tarball containing a CodeQL query and all its dependencies +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetQueryPack(value *string)() { + m.query_pack = value +} +// SetRepositories sets the repositories property value. List of repository names (in the form `owner/repo-name`) to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositories(value []string)() { + m.repositories = value +} +// SetRepositoryLists sets the repository_lists property value. List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositoryLists(value []string)() { + m.repository_lists = value +} +// SetRepositoryOwners sets the repository_owners property value. List of organization or user names whose repositories the query should be run against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +func (m *ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBody) SetRepositoryOwners(value []string)() { + m.repository_owners = value +} +type ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguage()(*i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage) + GetQueryPack()(*string) + GetRepositories()([]string) + GetRepositoryLists()([]string) + GetRepositoryOwners()([]string) + SetLanguage(value *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisLanguage)() + SetQueryPack(value *string)() + SetRepositories(value []string)() + SetRepositoryLists(value []string)() + SetRepositoryOwners(value []string)() +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go new file mode 100644 index 00000000..178492f4 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_request_builder.go @@ -0,0 +1,80 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses +type ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByCodeql_variant_analysis_id gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.codeScanning.codeql.variantAnalyses.item collection +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) ByCodeql_variant_analysis_id(codeql_variant_analysis_id int32)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["codeql_variant_analysis_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(codeql_variant_analysis_id), 10) + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilderInternal(urlParams, requestAdapter) +} +// Post creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a CodeScanningVariantAnalysisable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 422 status code +// returns a CodeScanningVariantAnalysis503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/code-scanning/code-scanning#create-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) Post(ctx context.Context, body ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisable), nil +} +// ToPostRequestInformation creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCodeScanningCodeqlVariantAnalysesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go new file mode 100644 index 00000000..ab0b60b8 --- /dev/null +++ b/pkg/github/repos/item_item_code_scanning_codeql_variant_analyses_with_codeql_variant_analysis_item_request_builder.go @@ -0,0 +1,68 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id} +type ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + m := &ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}", pathParameters), + } + return m +} +// NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder instantiates a new ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder and sets the default values. +func NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets the summary of a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a CodeScanningVariantAnalysisable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a CodeScanningVariantAnalysis503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/code-scanning/code-scanning#get-the-summary-of-a-codeql-variant-analysis +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysis503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningVariantAnalysisFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningVariantAnalysisable), nil +} +// Repos the repos property +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) Repos()(*ItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesItemReposRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation gets the summary of a CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// returns a *RequestInformation when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder when successful +func (m *ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder) { + return NewItemItemCodeScanningCodeqlVariantAnalysesWithCodeql_variant_analysis_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go b/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go index d0c261c9..1a374bd8 100644 --- a/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go +++ b/pkg/github/repos/item_item_collaborators_with_username_item_request_builder.go @@ -64,7 +64,7 @@ func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Get(ctx context.Co func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) Permission()(*ItemItemCollaboratorsItemPermissionRequestBuilder) { return NewItemItemCollaboratorsItemPermissionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Put this endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. +// Put this endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. // returns a RepositoryInvitationable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -104,7 +104,7 @@ func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) ToGetRequestInform i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToPutRequestInformation this endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. +// ToPutRequestInformation this endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).**Updating an existing collaborator's permission level**The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.**Rate limits**You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. // returns a *RequestInformation when successful func (m *ItemItemCollaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_item_comments_request_builder.go b/pkg/github/repos/item_item_commits_item_comments_request_builder.go index f90cecba..eaf14794 100644 --- a/pkg/github/repos/item_item_commits_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_commits_item_comments_request_builder.go @@ -52,7 +52,7 @@ func (m *ItemItemCommitsItemCommentsRequestBuilder) Get(ctx context.Context, req } return val, nil } -// Post create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a CommitCommentable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -85,7 +85,7 @@ func (m *ItemItemCommitsItemCommentsRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemCommitsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCommitsItemCommentsPostRequestBodyable, 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_compare_with_basehead_item_request_builder.go b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go index 2ecdcba4..3b10de36 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/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/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, but it includes all 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/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/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/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/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. | 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/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/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/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, but it includes all 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/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/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/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/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. | // 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.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.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/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/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, but it includes all 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/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/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/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/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. | // 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_issues_item_comments_request_builder.go b/pkg/github/repos/item_item_issues_item_comments_request_builder.go index f6ef87d9..e23df40f 100644 --- a/pkg/github/repos/item_item_issues_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_issues_item_comments_request_builder.go @@ -61,7 +61,7 @@ func (m *ItemItemIssuesItemCommentsRequestBuilder) Get(ctx context.Context, requ } return val, nil } -// Post you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a IssueCommentable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -98,7 +98,7 @@ func (m *ItemItemIssuesItemCommentsRequestBuilder) ToGetRequestInformation(ctx c requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemCommentsPostRequestBodyable, 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_issues_request_builder.go b/pkg/github/repos/item_item_issues_request_builder.go index d3a05228..2671fe11 100644 --- a/pkg/github/repos/item_item_issues_request_builder.go +++ b/pkg/github/repos/item_item_issues_request_builder.go @@ -99,7 +99,7 @@ func (m *ItemItemIssuesRequestBuilder) Get(ctx context.Context, requestConfigura } return val, nil } -// Post any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a Issueable when successful // returns a BasicError error when the service returns a 400 status code // returns a BasicError error when the service returns a 403 status code @@ -140,7 +140,7 @@ func (m *ItemItemIssuesRequestBuilder) ToGetRequestInformation(ctx context.Conte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemIssuesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesPostRequestBodyable, 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_pages_put_request_body.go b/pkg/github/repos/item_item_pages_put_request_body.go index caa7e4a6..cdcd531d 100644 --- a/pkg/github/repos/item_item_pages_put_request_body.go +++ b/pkg/github/repos/item_item_pages_put_request_body.go @@ -7,7 +7,7 @@ import ( type ItemItemPagesPutRequestBody struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." + // Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site)." cname *string // Specify whether HTTPS should be enforced for the repository. https_enforced *bool @@ -115,7 +115,7 @@ func CreateItemItemPagesPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2 func (m *ItemItemPagesPutRequestBody) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetCname gets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." +// GetCname gets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site)." // returns a *string when successful func (m *ItemItemPagesPutRequestBody) GetCname()(*string) { return m.cname @@ -198,7 +198,7 @@ func (m *ItemItemPagesPutRequestBody) Serialize(writer i878a80d2330e89d26896388a func (m *ItemItemPagesPutRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetCname sets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." +// SetCname sets the cname property value. Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site)." func (m *ItemItemPagesPutRequestBody) SetCname(value *string)() { m.cname = value } diff --git a/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go index 26962f1a..bf166510 100644 --- a/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_comments_item_replies_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemPullsItemCommentsItemRepliesRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewItemItemPullsItemCommentsItemRepliesRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestReviewCommentable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -46,7 +46,7 @@ func (m *ItemItemPullsItemCommentsItemRepliesRequestBuilder) Post(ctx context.Co } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PullRequestReviewCommentable), nil } -// ToPostRequestInformation creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemCommentsItemRepliesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCommentsItemRepliesPostRequestBodyable, 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_pulls_item_comments_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go index 521f634b..54a492a3 100644 --- a/pkg/github/repos/item_item_pulls_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go @@ -71,7 +71,7 @@ func (m *ItemItemPullsItemCommentsRequestBuilder) Get(ctx context.Context, reque } return val, nil } -// Post creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestReviewCommentable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -104,7 +104,7 @@ func (m *ItemItemPullsItemCommentsRequestBuilder) ToGetRequestInformation(ctx co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCommentsPostRequestBodyable, 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_pulls_item_merge_request_builder.go b/pkg/github/repos/item_item_pulls_item_merge_request_builder.go index d2ad7fad..0624d152 100644 --- a/pkg/github/repos/item_item_pulls_item_merge_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_merge_request_builder.go @@ -38,7 +38,7 @@ func (m *ItemItemPullsItemMergeRequestBuilder) Get(ctx context.Context, requestC } return nil } -// Put merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// Put merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a PullRequestMergeResultable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -76,7 +76,7 @@ func (m *ItemItemPullsItemMergeRequestBuilder) ToGetRequestInformation(ctx conte i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToPutRequestInformation merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// ToPutRequestInformation merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemItemPullsItemMergeRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemPullsItemMergePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go b/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go index eee956d7..872582d4 100644 --- a/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_requested_reviewers_request_builder.go @@ -65,7 +65,7 @@ func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) Get(ctx context.Con } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PullRequestReviewRequestable), nil } -// Post requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// Post requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a PullRequestSimpleable when successful // returns a BasicError error when the service returns a 403 status code // [API method documentation] @@ -108,7 +108,7 @@ func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) ToGetRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// ToPostRequestInformation requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemItemPullsItemRequested_reviewersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemRequested_reviewersPostRequestBodyable, 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_pulls_item_reviews_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go index 0c3eecd8..25ee6367 100644 --- a/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go @@ -63,7 +63,7 @@ func (m *ItemItemPullsItemReviewsRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// Post creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestReviewable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationErrorSimple error when the service returns a 422 status code @@ -96,7 +96,7 @@ func (m *ItemItemPullsItemReviewsRequestBuilder) ToGetRequestInformation(ctx con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemReviewsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsPostRequestBodyable, 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_pulls_request_builder.go b/pkg/github/repos/item_item_pulls_request_builder.go index 01ac8858..f401b217 100644 --- a/pkg/github/repos/item_item_pulls_request_builder.go +++ b/pkg/github/repos/item_item_pulls_request_builder.go @@ -83,7 +83,7 @@ func (m *ItemItemPullsRequestBuilder) Get(ctx context.Context, requestConfigurat } return val, nil } -// Post draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Post draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -116,7 +116,7 @@ func (m *ItemItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Contex requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsPostRequestBodyable, 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_pulls_with_pull_number_item_request_builder.go b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go index 0739e0df..28349c25 100644 --- a/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go +++ b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go @@ -43,7 +43,7 @@ func NewItemItemPullsWithPull_numberItemRequestBuilder(rawUrl string, requestAda func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Files()(*ItemItemPullsItemFilesRequestBuilder) { return NewItemItemPullsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// Get draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. // returns a PullRequestable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 406 status code @@ -112,7 +112,7 @@ func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Requested_reviewers()(* func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Reviews()(*ItemItemPullsItemReviewsRequestBuilder) { return NewItemItemPullsItemReviewsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ToGetRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. // returns a *RequestInformation when successful func (m *ItemItemPullsWithPull_numberItemRequestBuilder) 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_releases_assets_with_asset_item_request_builder.go b/pkg/github/repos/item_item_releases_assets_with_asset_item_request_builder.go index e4e01f91..ed76f876 100644 --- a/pkg/github/repos/item_item_releases_assets_with_asset_item_request_builder.go +++ b/pkg/github/repos/item_item_releases_assets_with_asset_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/rest/overview/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, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/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/rest/overview/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, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/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_releases_request_builder.go b/pkg/github/repos/item_item_releases_request_builder.go index 8c1b5526..a1d78620 100644 --- a/pkg/github/repos/item_item_releases_request_builder.go +++ b/pkg/github/repos/item_item_releases_request_builder.go @@ -82,7 +82,7 @@ func (m *ItemItemReleasesRequestBuilder) Get(ctx context.Context, requestConfigu func (m *ItemItemReleasesRequestBuilder) Latest()(*ItemItemReleasesLatestRequestBuilder) { return NewItemItemReleasesLatestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Post users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// Post users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a Releaseable when successful // returns a BasicError error when the service returns a 404 status code // returns a ValidationError error when the service returns a 422 status code @@ -120,7 +120,7 @@ func (m *ItemItemReleasesRequestBuilder) ToGetRequestInformation(ctx context.Con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." +// ToPostRequestInformation users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemItemReleasesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesPostRequestBodyable, 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_stats_code_frequency_request_builder.go b/pkg/github/repos/item_item_stats_code_frequency_request_builder.go index 0adef0d7..13d30858 100644 --- a/pkg/github/repos/item_item_stats_code_frequency_request_builder.go +++ b/pkg/github/repos/item_item_stats_code_frequency_request_builder.go @@ -3,6 +3,7 @@ package repos import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // ItemItemStatsCode_frequencyRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\code_frequency @@ -23,26 +24,23 @@ func NewItemItemStatsCode_frequencyRequestBuilder(rawUrl string, requestAdapter return NewItemItemStatsCode_frequencyRequestBuilderInternal(urlParams, requestAdapter) } // Get returns a weekly aggregate of the number of additions and deletions pushed to a repository.**Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains10,000 or more commits, a 422 status code will be returned. -// returns a []int32 when successful +// returns a UntypedNodeable when successful // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity -func (m *ItemItemStatsCode_frequencyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]int32, error) { +func (m *ItemItemStatsCode_frequencyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err } - res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "int32", nil) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue, nil) if err != nil { return nil, err } - val := make([]int32, len(res)) - for i, v := range res { - if v != nil { - val[i] = *(v.(*int32)) - } + if res == nil { + return nil, nil } - return val, nil + return res.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable), nil } // ToGetRequestInformation returns a weekly aggregate of the number of additions and deletions pushed to a repository.**Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains10,000 or more commits, a 422 status code will be returned. // returns a *RequestInformation when successful diff --git a/pkg/github/repos/item_item_stats_punch_card_request_builder.go b/pkg/github/repos/item_item_stats_punch_card_request_builder.go index c9c2f2fa..64704611 100644 --- a/pkg/github/repos/item_item_stats_punch_card_request_builder.go +++ b/pkg/github/repos/item_item_stats_punch_card_request_builder.go @@ -3,6 +3,7 @@ package repos import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // ItemItemStatsPunch_cardRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\punch_card @@ -23,26 +24,23 @@ func NewItemItemStatsPunch_cardRequestBuilder(rawUrl string, requestAdapter i2ae return NewItemItemStatsPunch_cardRequestBuilderInternal(urlParams, requestAdapter) } // Get each array contains the day number, hour number, and number of commits:* `0-6`: Sunday - Saturday* `0-23`: Hour of day* Number of commitsFor example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. -// returns a []int32 when successful +// returns a UntypedNodeable when successful // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/metrics/statistics#get-the-hourly-commit-count-for-each-day -func (m *ItemItemStatsPunch_cardRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]int32, error) { +func (m *ItemItemStatsPunch_cardRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err } - res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitiveCollection(ctx, requestInfo, "int32", nil) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue, nil) if err != nil { return nil, err } - val := make([]int32, len(res)) - for i, v := range res { - if v != nil { - val[i] = *(v.(*int32)) - } + if res == nil { + return nil, nil } - return val, nil + return res.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable), nil } // ToGetRequestInformation each array contains the day number, hour number, and number of commits:* `0-6`: Sunday - Saturday* `0-23`: Hour of day* Number of commitsFor example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. // returns a *RequestInformation when successful diff --git a/pkg/github/search/code/get_order_query_parameter_type.go b/pkg/github/search/code/get_order_query_parameter_type.go index d8bb7911..56abb0a2 100644 --- a/pkg/github/search/code/get_order_query_parameter_type.go +++ b/pkg/github/search/code/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package code -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/code/get_sort_query_parameter_type.go b/pkg/github/search/code/get_sort_query_parameter_type.go index 0fa78368..5c25337e 100644 --- a/pkg/github/search/code/get_sort_query_parameter_type.go +++ b/pkg/github/search/code/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package code -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -17,7 +14,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "indexed": result = INDEXED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/commits/get_order_query_parameter_type.go b/pkg/github/search/commits/get_order_query_parameter_type.go index be4e597e..a59bfc97 100644 --- a/pkg/github/search/commits/get_order_query_parameter_type.go +++ b/pkg/github/search/commits/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package commits -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/commits/get_sort_query_parameter_type.go b/pkg/github/search/commits/get_sort_query_parameter_type.go index 7126aa6e..d29417be 100644 --- a/pkg/github/search/commits/get_sort_query_parameter_type.go +++ b/pkg/github/search/commits/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package commits -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "committer-date": result = COMMITTERDATE_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/issues/get_order_query_parameter_type.go b/pkg/github/search/issues/get_order_query_parameter_type.go index ce4e43fb..a68b72e6 100644 --- a/pkg/github/search/issues/get_order_query_parameter_type.go +++ b/pkg/github/search/issues/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/issues/get_sort_query_parameter_type.go b/pkg/github/search/issues/get_sort_query_parameter_type.go index 9ccb41cd..5fcfb629 100644 --- a/pkg/github/search/issues/get_sort_query_parameter_type.go +++ b/pkg/github/search/issues/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -47,7 +44,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/labels/get_order_query_parameter_type.go b/pkg/github/search/labels/get_order_query_parameter_type.go index b362c2e5..a4360f92 100644 --- a/pkg/github/search/labels/get_order_query_parameter_type.go +++ b/pkg/github/search/labels/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package labels -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/labels/get_sort_query_parameter_type.go b/pkg/github/search/labels/get_sort_query_parameter_type.go index 37816f7b..b2442a79 100644 --- a/pkg/github/search/labels/get_sort_query_parameter_type.go +++ b/pkg/github/search/labels/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package labels -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/repositories/get_order_query_parameter_type.go b/pkg/github/search/repositories/get_order_query_parameter_type.go index 3933a58d..91f98d05 100644 --- a/pkg/github/search/repositories/get_order_query_parameter_type.go +++ b/pkg/github/search/repositories/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package repositories -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/repositories/get_sort_query_parameter_type.go b/pkg/github/search/repositories/get_sort_query_parameter_type.go index 8fcb5c26..d27adf24 100644 --- a/pkg/github/search/repositories/get_sort_query_parameter_type.go +++ b/pkg/github/search/repositories/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package repositories -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/users/get_order_query_parameter_type.go b/pkg/github/search/users/get_order_query_parameter_type.go index 30eed7b6..cf1024fb 100644 --- a/pkg/github/search/users/get_order_query_parameter_type.go +++ b/pkg/github/search/users/get_order_query_parameter_type.go @@ -1,7 +1,4 @@ package users -import ( - "errors" -) type GetOrderQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetOrderQueryParameterType(v string) (any, error) { case "asc": result = ASC_GETORDERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetOrderQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/search/users/get_sort_query_parameter_type.go b/pkg/github/search/users/get_sort_query_parameter_type.go index 34792601..98001837 100644 --- a/pkg/github/search/users/get_sort_query_parameter_type.go +++ b/pkg/github/search/users/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package users -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "joined": result = JOINED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go b/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go index 9b519628..464403a3 100644 --- a/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go +++ b/pkg/github/teams/item/discussions/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package discussions -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go b/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go index ac255063..6561eb6a 100644 --- a/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go +++ b/pkg/github/teams/item/discussions/item/comments/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package comments -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go b/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/teams/item/discussions/item/comments/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go b/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go index c934402d..5b2e6072 100644 --- a/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/teams/item/discussions/item/comments/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go b/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go index 7aef65a2..f3e64542 100644 --- a/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go +++ b/pkg/github/teams/item/discussions/item/reactions/get_content_query_parameter_type.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) type GetContentQueryParameterType int const ( @@ -38,7 +35,7 @@ func ParseGetContentQueryParameterType(v string) (any, error) { case "eyes": result = EYES_GETCONTENTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetContentQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go b/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go index 114e88e0..733707c9 100644 --- a/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go +++ b/pkg/github/teams/item/discussions/item/reactions/reactions_post_request_body_content.go @@ -1,7 +1,4 @@ package reactions -import ( - "errors" -) // The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. type ReactionsPostRequestBody_content int @@ -39,7 +36,7 @@ func ParseReactionsPostRequestBody_content(v string) (any, error) { case "eyes": result = EYES_REACTIONSPOSTREQUESTBODY_CONTENT default: - return 0, errors.New("Unknown ReactionsPostRequestBody_content value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/members/get_role_query_parameter_type.go b/pkg/github/teams/item/members/get_role_query_parameter_type.go index d4e359b4..4d703803 100644 --- a/pkg/github/teams/item/members/get_role_query_parameter_type.go +++ b/pkg/github/teams/item/members/get_role_query_parameter_type.go @@ -1,7 +1,4 @@ package members -import ( - "errors" -) type GetRoleQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetRoleQueryParameterType(v string) (any, error) { case "all": result = ALL_GETROLEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetRoleQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go b/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go index 33df378a..d01d40bb 100644 --- a/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go +++ b/pkg/github/teams/item/memberships/item/with_username_put_request_body_role.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The role that this user should have in the team. type WithUsernamePutRequestBody_role int @@ -21,7 +18,7 @@ func ParseWithUsernamePutRequestBody_role(v string) (any, error) { case "maintainer": result = MAINTAINER_WITHUSERNAMEPUTREQUESTBODY_ROLE default: - return 0, errors.New("Unknown WithUsernamePutRequestBody_role value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go b/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go index 830dd0aa..d7978dc3 100644 --- a/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go +++ b/pkg/github/teams/item/projects/item/with_project_put_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." type WithProject_PutRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithProject_PutRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHPROJECT_PUTREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithProject_PutRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go b/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go index 2d8cc210..4adae412 100644 --- a/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go +++ b/pkg/github/teams/item/repos/item/item/with_repo_put_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. type WithRepoPutRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithRepoPutRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHREPOPUTREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithRepoPutRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go b/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go index aab33e5e..9bad994e 100644 --- a/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go +++ b/pkg/github/teams/item/with_team_patch_request_body_notification_setting.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications. type WithTeam_PatchRequestBody_notification_setting int @@ -21,7 +18,7 @@ func ParseWithTeam_PatchRequestBody_notification_setting(v string) (any, error) case "notifications_disabled": result = NOTIFICATIONS_DISABLED_WITHTEAM_PATCHREQUESTBODY_NOTIFICATION_SETTING default: - return 0, errors.New("Unknown WithTeam_PatchRequestBody_notification_setting value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/with_team_patch_request_body_permission.go b/pkg/github/teams/item/with_team_patch_request_body_permission.go index e2cc7ad5..e4493fdf 100644 --- a/pkg/github/teams/item/with_team_patch_request_body_permission.go +++ b/pkg/github/teams/item/with_team_patch_request_body_permission.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // **Deprecated**. The permission that new repositories will be added to the team with when none is specified. type WithTeam_PatchRequestBody_permission int @@ -24,7 +21,7 @@ func ParseWithTeam_PatchRequestBody_permission(v string) (any, error) { case "admin": result = ADMIN_WITHTEAM_PATCHREQUESTBODY_PERMISSION default: - return 0, errors.New("Unknown WithTeam_PatchRequestBody_permission value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item/with_team_patch_request_body_privacy.go b/pkg/github/teams/item/with_team_patch_request_body_privacy.go index 9b2f1bd8..8159c993 100644 --- a/pkg/github/teams/item/with_team_patch_request_body_privacy.go +++ b/pkg/github/teams/item/with_team_patch_request_body_privacy.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. **For a parent or child team:** * `closed` - visible to all members of this organization. type WithTeam_PatchRequestBody_privacy int @@ -21,7 +18,7 @@ func ParseWithTeam_PatchRequestBody_privacy(v string) (any, error) { case "closed": result = CLOSED_WITHTEAM_PATCHREQUESTBODY_PRIVACY default: - return 0, errors.New("Unknown WithTeam_PatchRequestBody_privacy value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/teams/item_discussions_item_comments_request_builder.go b/pkg/github/teams/item_discussions_item_comments_request_builder.go index 5e32fdad..4271a3bd 100644 --- a/pkg/github/teams/item_discussions_item_comments_request_builder.go +++ b/pkg/github/teams/item_discussions_item_comments_request_builder.go @@ -68,7 +68,7 @@ func (m *ItemDiscussionsItemCommentsRequestBuilder) Get(ctx context.Context, req } return val, nil } -// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // Deprecated: // returns a TeamDiscussionCommentable when successful // [API method documentation] @@ -97,7 +97,7 @@ func (m *ItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/pkg/github/teams/item_discussions_request_builder.go b/pkg/github/teams/item_discussions_request_builder.go index 00c16d06..9ae3e66d 100644 --- a/pkg/github/teams/item_discussions_request_builder.go +++ b/pkg/github/teams/item_discussions_request_builder.go @@ -68,7 +68,7 @@ func (m *ItemDiscussionsRequestBuilder) Get(ctx context.Context, requestConfigur } return val, nil } -// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// Post **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // Deprecated: // returns a TeamDiscussionable when successful // [API method documentation] @@ -97,7 +97,7 @@ func (m *ItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx context.Cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. +// ToPostRequestInformation **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go b/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go index 87069612..4ebd025e 100644 --- a/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go +++ b/pkg/github/teams/item_repos_item_with_repo_item_request_builder.go @@ -39,7 +39,7 @@ func (m *ItemReposItemWithRepoItemRequestBuilder) Delete(ctx context.Context, re } return nil } -// Get **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: +// Get **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: // Deprecated: // returns a TeamRepositoryable when successful // [API method documentation] @@ -89,7 +89,7 @@ func (m *ItemReposItemWithRepoItemRequestBuilder) ToDeleteRequestInformation(ctx i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: +// ToGetRequestInformation **Note**: Repositories inherited through a parent team will also be checked.**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: // Deprecated: // returns a *RequestInformation when successful func (m *ItemReposItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go b/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go index bebc89ee..3046c117 100644 --- a/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go +++ b/pkg/github/user/codespaces/codespaces_post_request_body_member1_geo.go @@ -1,7 +1,4 @@ package codespaces -import ( - "errors" -) // The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. type CodespacesPostRequestBodyMember1_geo int @@ -27,7 +24,7 @@ func ParseCodespacesPostRequestBodyMember1_geo(v string) (any, error) { case "UsWest": result = USWEST_CODESPACESPOSTREQUESTBODYMEMBER1_GEO default: - return 0, errors.New("Unknown CodespacesPostRequestBodyMember1_geo value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go b/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go index 91ffbe93..33d4cb43 100644 --- a/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go +++ b/pkg/github/user/codespaces/codespaces_post_request_body_member2_geo.go @@ -1,7 +1,4 @@ package codespaces -import ( - "errors" -) // The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. type CodespacesPostRequestBodyMember2_geo int @@ -27,7 +24,7 @@ func ParseCodespacesPostRequestBodyMember2_geo(v string) (any, error) { case "UsWest": result = USWEST_CODESPACESPOSTREQUESTBODYMEMBER2_GEO default: - return 0, errors.New("Unknown CodespacesPostRequestBodyMember2_geo value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go b/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go index 2bc16372..94db1db4 100644 --- a/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go +++ b/pkg/github/user/email/visibility/visibility_patch_request_body_visibility.go @@ -1,7 +1,4 @@ package visibility -import ( - "errors" -) // Denotes whether an email is publicly visible. type VisibilityPatchRequestBody_visibility int @@ -21,7 +18,7 @@ func ParseVisibilityPatchRequestBody_visibility(v string) (any, error) { case "private": result = PRIVATE_VISIBILITYPATCHREQUESTBODY_VISIBILITY default: - return 0, errors.New("Unknown VisibilityPatchRequestBody_visibility value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/issues/get_direction_query_parameter_type.go b/pkg/github/user/issues/get_direction_query_parameter_type.go index 6aca6ecb..f176c1cc 100644 --- a/pkg/github/user/issues/get_direction_query_parameter_type.go +++ b/pkg/github/user/issues/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/issues/get_filter_query_parameter_type.go b/pkg/github/user/issues/get_filter_query_parameter_type.go index bd35fa09..0c77b959 100644 --- a/pkg/github/user/issues/get_filter_query_parameter_type.go +++ b/pkg/github/user/issues/get_filter_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetFilterQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) { case "all": result = ALL_GETFILTERQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/issues/get_sort_query_parameter_type.go b/pkg/github/user/issues/get_sort_query_parameter_type.go index ba962acf..10b7912a 100644 --- a/pkg/github/user/issues/get_sort_query_parameter_type.go +++ b/pkg/github/user/issues/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "comments": result = COMMENTS_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/issues/get_state_query_parameter_type.go b/pkg/github/user/issues/get_state_query_parameter_type.go index 55415107..065faf93 100644 --- a/pkg/github/user/issues/get_state_query_parameter_type.go +++ b/pkg/github/user/issues/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package issues -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go b/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go index d160652e..bad195de 100644 --- a/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go +++ b/pkg/github/user/memberships/orgs/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package orgs -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "pending": result = PENDING_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go b/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go index ba2ff300..1d1d089a 100644 --- a/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go +++ b/pkg/github/user/memberships/orgs/item/with_org_patch_request_body_state.go @@ -1,7 +1,4 @@ package item -import ( - "errors" -) // The state that the membership should be in. Only `"active"` will be accepted. type WithOrgPatchRequestBody_state int @@ -18,7 +15,7 @@ func ParseWithOrgPatchRequestBody_state(v string) (any, error) { case "active": result = ACTIVE_WITHORGPATCHREQUESTBODY_STATE default: - return 0, errors.New("Unknown WithOrgPatchRequestBody_state value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/migrations/migrations_post_request_body_exclude.go b/pkg/github/user/migrations/migrations_post_request_body_exclude.go index f0c88b90..e176c69d 100644 --- a/pkg/github/user/migrations/migrations_post_request_body_exclude.go +++ b/pkg/github/user/migrations/migrations_post_request_body_exclude.go @@ -1,7 +1,4 @@ package migrations -import ( - "errors" -) // Allowed values that can be passed to the exclude param. type MigrationsPostRequestBody_exclude int @@ -18,7 +15,7 @@ func ParseMigrationsPostRequestBody_exclude(v string) (any, error) { case "repositories": result = REPOSITORIES_MIGRATIONSPOSTREQUESTBODY_EXCLUDE default: - return 0, errors.New("Unknown MigrationsPostRequestBody_exclude value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/packages/get_package_type_query_parameter_type.go b/pkg/github/user/packages/get_package_type_query_parameter_type.go index ae4025d3..071c8927 100644 --- a/pkg/github/user/packages/get_package_type_query_parameter_type.go +++ b/pkg/github/user/packages/get_package_type_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetPackage_typeQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetPackage_typeQueryParameterType(v string) (any, error) { case "container": result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/packages/get_visibility_query_parameter_type.go b/pkg/github/user/packages/get_visibility_query_parameter_type.go index daf1c43e..f6ffbef0 100644 --- a/pkg/github/user/packages/get_visibility_query_parameter_type.go +++ b/pkg/github/user/packages/get_visibility_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetVisibilityQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetVisibilityQueryParameterType(v string) (any, error) { case "internal": result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go b/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go index cf4ef3c8..e78d12f6 100644 --- a/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go +++ b/pkg/github/user/packages/item/item/versions/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package versions -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "deleted": result = DELETED_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/get_direction_query_parameter_type.go b/pkg/github/user/repos/get_direction_query_parameter_type.go index afa5d0fa..03a299e2 100644 --- a/pkg/github/user/repos/get_direction_query_parameter_type.go +++ b/pkg/github/user/repos/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/get_sort_query_parameter_type.go b/pkg/github/user/repos/get_sort_query_parameter_type.go index 8dee1bb8..58939d2b 100644 --- a/pkg/github/user/repos/get_sort_query_parameter_type.go +++ b/pkg/github/user/repos/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "full_name": result = FULL_NAME_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/get_type_query_parameter_type.go b/pkg/github/user/repos/get_type_query_parameter_type.go index 9272720c..8efe1374 100644 --- a/pkg/github/user/repos/get_type_query_parameter_type.go +++ b/pkg/github/user/repos/get_type_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetTypeQueryParameterType int const ( @@ -29,7 +26,7 @@ func ParseGetTypeQueryParameterType(v string) (any, error) { case "member": result = MEMBER_GETTYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/get_visibility_query_parameter_type.go b/pkg/github/user/repos/get_visibility_query_parameter_type.go index 73b63410..786b54e9 100644 --- a/pkg/github/user/repos/get_visibility_query_parameter_type.go +++ b/pkg/github/user/repos/get_visibility_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetVisibilityQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetVisibilityQueryParameterType(v string) (any, error) { case "private": result = PRIVATE_GETVISIBILITYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go b/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go index 50a0ccf4..38d5b057 100644 --- a/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go +++ b/pkg/github/user/repos/repos_post_request_body_merge_commit_message.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. type ReposPostRequestBody_merge_commit_message int @@ -24,7 +21,7 @@ func ParseReposPostRequestBody_merge_commit_message(v string) (any, error) { case "BLANK": result = BLANK_REPOSPOSTREQUESTBODY_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go index dd1e4b9d..27a28651 100644 --- a/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go +++ b/pkg/github/user/repos/repos_post_request_body_merge_commit_title.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). type ReposPostRequestBody_merge_commit_title int @@ -21,7 +18,7 @@ func ParseReposPostRequestBody_merge_commit_title(v string) (any, error) { case "MERGE_MESSAGE": result = MERGE_MESSAGE_REPOSPOSTREQUESTBODY_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown ReposPostRequestBody_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go index 0ecd209b..1e336e72 100644 --- a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go +++ b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_message.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. type ReposPostRequestBody_squash_merge_commit_message int @@ -24,7 +21,7 @@ func ParseReposPostRequestBody_squash_merge_commit_message(v string) (any, error case "BLANK": result = BLANK_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE default: - return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_message value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go index 51ceb4f6..39555681 100644 --- a/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go +++ b/pkg/github/user/repos/repos_post_request_body_squash_merge_commit_title.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). type ReposPostRequestBody_squash_merge_commit_title int @@ -21,7 +18,7 @@ func ParseReposPostRequestBody_squash_merge_commit_title(v string) (any, error) case "COMMIT_OR_PR_TITLE": result = COMMIT_OR_PR_TITLE_REPOSPOSTREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE default: - return 0, errors.New("Unknown ReposPostRequestBody_squash_merge_commit_title value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/starred/get_direction_query_parameter_type.go b/pkg/github/user/starred/get_direction_query_parameter_type.go index 3ac3d71e..c2f626bb 100644 --- a/pkg/github/user/starred/get_direction_query_parameter_type.go +++ b/pkg/github/user/starred/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package starred -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/user/starred/get_sort_query_parameter_type.go b/pkg/github/user/starred/get_sort_query_parameter_type.go index 604bb061..a7875d45 100644 --- a/pkg/github/user/starred/get_sort_query_parameter_type.go +++ b/pkg/github/user/starred/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package starred -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go b/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go index d9ad67a0..97ec2398 100644 --- a/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go +++ b/pkg/github/users/item/hovercard/get_subject_type_query_parameter_type.go @@ -1,7 +1,4 @@ package hovercard -import ( - "errors" -) type GetSubject_typeQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSubject_typeQueryParameterType(v string) (any, error) { case "pull_request": result = PULL_REQUEST_GETSUBJECT_TYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSubject_typeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/packages/get_package_type_query_parameter_type.go b/pkg/github/users/item/packages/get_package_type_query_parameter_type.go index ae4025d3..071c8927 100644 --- a/pkg/github/users/item/packages/get_package_type_query_parameter_type.go +++ b/pkg/github/users/item/packages/get_package_type_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetPackage_typeQueryParameterType int const ( @@ -32,7 +29,7 @@ func ParseGetPackage_typeQueryParameterType(v string) (any, error) { case "container": result = CONTAINER_GETPACKAGE_TYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetPackage_typeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/packages/get_visibility_query_parameter_type.go b/pkg/github/users/item/packages/get_visibility_query_parameter_type.go index daf1c43e..f6ffbef0 100644 --- a/pkg/github/users/item/packages/get_visibility_query_parameter_type.go +++ b/pkg/github/users/item/packages/get_visibility_query_parameter_type.go @@ -1,7 +1,4 @@ package packages -import ( - "errors" -) type GetVisibilityQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetVisibilityQueryParameterType(v string) (any, error) { case "internal": result = INTERNAL_GETVISIBILITYQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetVisibilityQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/projects/get_state_query_parameter_type.go b/pkg/github/users/item/projects/get_state_query_parameter_type.go index 985374b5..2c9bc230 100644 --- a/pkg/github/users/item/projects/get_state_query_parameter_type.go +++ b/pkg/github/users/item/projects/get_state_query_parameter_type.go @@ -1,7 +1,4 @@ package projects -import ( - "errors" -) type GetStateQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) { case "all": result = ALL_GETSTATEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetStateQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/repos/get_direction_query_parameter_type.go b/pkg/github/users/item/repos/get_direction_query_parameter_type.go index afa5d0fa..03a299e2 100644 --- a/pkg/github/users/item/repos/get_direction_query_parameter_type.go +++ b/pkg/github/users/item/repos/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/repos/get_sort_query_parameter_type.go b/pkg/github/users/item/repos/get_sort_query_parameter_type.go index 8dee1bb8..58939d2b 100644 --- a/pkg/github/users/item/repos/get_sort_query_parameter_type.go +++ b/pkg/github/users/item/repos/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -26,7 +23,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "full_name": result = FULL_NAME_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/repos/get_type_query_parameter_type.go b/pkg/github/users/item/repos/get_type_query_parameter_type.go index 6ae776fd..4a14923c 100644 --- a/pkg/github/users/item/repos/get_type_query_parameter_type.go +++ b/pkg/github/users/item/repos/get_type_query_parameter_type.go @@ -1,7 +1,4 @@ package repos -import ( - "errors" -) type GetTypeQueryParameterType int const ( @@ -23,7 +20,7 @@ func ParseGetTypeQueryParameterType(v string) (any, error) { case "member": result = MEMBER_GETTYPEQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/starred/get_direction_query_parameter_type.go b/pkg/github/users/item/starred/get_direction_query_parameter_type.go index 3ac3d71e..c2f626bb 100644 --- a/pkg/github/users/item/starred/get_direction_query_parameter_type.go +++ b/pkg/github/users/item/starred/get_direction_query_parameter_type.go @@ -1,7 +1,4 @@ package starred -import ( - "errors" -) type GetDirectionQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) { case "desc": result = DESC_GETDIRECTIONQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v) + return nil, nil } return &result, nil } diff --git a/pkg/github/users/item/starred/get_sort_query_parameter_type.go b/pkg/github/users/item/starred/get_sort_query_parameter_type.go index 604bb061..a7875d45 100644 --- a/pkg/github/users/item/starred/get_sort_query_parameter_type.go +++ b/pkg/github/users/item/starred/get_sort_query_parameter_type.go @@ -1,7 +1,4 @@ package starred -import ( - "errors" -) type GetSortQueryParameterType int const ( @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) { case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE default: - return 0, errors.New("Unknown GetSortQueryParameterType value: " + v) + return nil, nil } return &result, nil }