diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index eeb60dac..f9b45660 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -2,7 +2,7 @@ "descriptionHash": "2679598123F08632A2FFC114750AED6269533BD439F3CA2487A054C8703177A95EE1ACCA7514CF91EB0672BDF9DF2275CCBDED4DAB6C8BE2F024F037132DF4AA", "descriptionLocation": "../../../source-generator/schemas/downloaded.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.9.0", + "kiotaVersion": "1.9.1", "clientClassName": "ApiClient", "clientNamespaceName": "github.com/octokit/go-sdk/pkg/github/", "language": "Go", diff --git a/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_message.go b/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_message.go new file mode 100644 index 00000000..8797cff9 --- /dev/null +++ b/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_message.go @@ -0,0 +1,40 @@ +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 OwnerPatchRequestBody_merge_commit_message int + +const ( + PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE OwnerPatchRequestBody_merge_commit_message = iota + PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + BLANK_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE +) + +func (i OwnerPatchRequestBody_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParseOwnerPatchRequestBody_merge_commit_message(v string) (any, error) { + result := PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown OwnerPatchRequestBody_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeOwnerPatchRequestBody_merge_commit_message(values []OwnerPatchRequestBody_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OwnerPatchRequestBody_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_title.go b/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_title.go new file mode 100644 index 00000000..b41820cb --- /dev/null +++ b/pkg/github/repos/item/item/owner_patch_request_body_merge_commit_title.go @@ -0,0 +1,37 @@ +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 OwnerPatchRequestBody_merge_commit_title int + +const ( + PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE OwnerPatchRequestBody_merge_commit_title = iota + MERGE_MESSAGE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE +) + +func (i OwnerPatchRequestBody_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParseOwnerPatchRequestBody_merge_commit_title(v string) (any, error) { + result := PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown OwnerPatchRequestBody_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeOwnerPatchRequestBody_merge_commit_title(values []OwnerPatchRequestBody_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OwnerPatchRequestBody_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_message.go b/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_message.go new file mode 100644 index 00000000..895f9e30 --- /dev/null +++ b/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +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 OwnerPatchRequestBody_squash_merge_commit_message int + +const ( + PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE OwnerPatchRequestBody_squash_merge_commit_message = iota + COMMIT_MESSAGES_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i OwnerPatchRequestBody_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParseOwnerPatchRequestBody_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown OwnerPatchRequestBody_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializeOwnerPatchRequestBody_squash_merge_commit_message(values []OwnerPatchRequestBody_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OwnerPatchRequestBody_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_title.go b/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_title.go new file mode 100644 index 00000000..c4d9fbc0 --- /dev/null +++ b/pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +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 OwnerPatchRequestBody_squash_merge_commit_title int + +const ( + PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE OwnerPatchRequestBody_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE +) + +func (i OwnerPatchRequestBody_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParseOwnerPatchRequestBody_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown OwnerPatchRequestBody_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializeOwnerPatchRequestBody_squash_merge_commit_title(values []OwnerPatchRequestBody_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OwnerPatchRequestBody_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item/item/owner_patch_request_body_visibility.go b/pkg/github/repos/item/item/owner_patch_request_body_visibility.go new file mode 100644 index 00000000..8ffdba10 --- /dev/null +++ b/pkg/github/repos/item/item/owner_patch_request_body_visibility.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The visibility of the repository. +type OwnerPatchRequestBody_visibility int + +const ( + PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY OwnerPatchRequestBody_visibility = iota + PRIVATE_OWNERPATCHREQUESTBODY_VISIBILITY +) + +func (i OwnerPatchRequestBody_visibility) String() string { + return []string{"public", "private"}[i] +} +func ParseOwnerPatchRequestBody_visibility(v string) (any, error) { + result := PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY + switch v { + case "public": + result = PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY + case "private": + result = PRIVATE_OWNERPATCHREQUESTBODY_VISIBILITY + default: + return 0, errors.New("Unknown OwnerPatchRequestBody_visibility value: " + v) + } + return &result, nil +} +func SerializeOwnerPatchRequestBody_visibility(values []OwnerPatchRequestBody_visibility) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OwnerPatchRequestBody_visibility) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item_item_commits_commits_item_request_builder.go b/pkg/github/repos/item_item_commits_commits_item_request_builder.go new file mode 100644 index 00000000..07f37c3d --- /dev/null +++ b/pkg/github/repos/item_item_commits_commits_item_request_builder.go @@ -0,0 +1,110 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemCommitsCommitsItemRequestBuilder builds and executes requests for operations under \repos\{repos-id}\{Owner-id}\commits\{commits-id} +type ItemItemCommitsCommitsItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemCommitsCommitsItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.You can 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. Diffs with binary data will have no `patch` property.To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +type ItemItemCommitsCommitsItemRequestBuilderGetQueryParameters struct { + // Page number of the results to fetch. + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). + Per_page *int32 `uriparametername:"per_page"` +} +// ItemItemCommitsCommitsItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemCommitsCommitsItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemItemCommitsCommitsItemRequestBuilderGetQueryParameters +} +// BranchesWhereHead the branchesWhereHead property +func (m *ItemItemCommitsCommitsItemRequestBuilder) BranchesWhereHead()(*ItemItemCommitsItemBranchesWhereHeadRequestBuilder) { + return NewItemItemCommitsItemBranchesWhereHeadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckRuns the checkRuns property +func (m *ItemItemCommitsCommitsItemRequestBuilder) CheckRuns()(*ItemItemCommitsItemCheckRunsRequestBuilder) { + return NewItemItemCommitsItemCheckRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckSuites the checkSuites property +func (m *ItemItemCommitsCommitsItemRequestBuilder) CheckSuites()(*ItemItemCommitsItemCheckSuitesRequestBuilder) { + return NewItemItemCommitsItemCheckSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +func (m *ItemItemCommitsCommitsItemRequestBuilder) Comments()(*ItemItemCommitsItemCommentsRequestBuilder) { + return NewItemItemCommitsItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemCommitsCommitsItemRequestBuilderInternal instantiates a new CommitsItemRequestBuilder and sets the default values. +func NewItemItemCommitsCommitsItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsCommitsItemRequestBuilder) { + m := &ItemItemCommitsCommitsItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{repos%2Did}/{Owner%2Did}/commits/{commits%2Did}{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemCommitsCommitsItemRequestBuilder instantiates a new CommitsItemRequestBuilder and sets the default values. +func NewItemItemCommitsCommitsItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsCommitsItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemCommitsCommitsItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.You can 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. Diffs with binary data will have no `patch` property.To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/commits/commits#get-a-commit +func (m *ItemItemCommitsCommitsItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemCommitsCommitsItemRequestBuilderGetRequestConfiguration)(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Commitable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCommit503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCommitFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Commitable), nil +} +// Pulls the pulls property +func (m *ItemItemCommitsCommitsItemRequestBuilder) Pulls()(*ItemItemCommitsItemPullsRequestBuilder) { + return NewItemItemCommitsItemPullsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Status the status property +func (m *ItemItemCommitsCommitsItemRequestBuilder) Status()(*ItemItemCommitsItemStatusRequestBuilder) { + return NewItemItemCommitsItemStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Statuses the statuses property +func (m *ItemItemCommitsCommitsItemRequestBuilder) Statuses()(*ItemItemCommitsItemStatusesRequestBuilder) { + return NewItemItemCommitsItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.You can 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. Diffs with binary data will have no `patch` property.To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +func (m *ItemItemCommitsCommitsItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemCommitsCommitsItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + 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. +func (m *ItemItemCommitsCommitsItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemCommitsCommitsItemRequestBuilder) { + return NewItemItemCommitsCommitsItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_commits_request_builder.go b/pkg/github/repos/item_item_commits_request_builder.go index 65fc9f60..c0fa861d 100644 --- a/pkg/github/repos/item_item_commits_request_builder.go +++ b/pkg/github/repos/item_item_commits_request_builder.go @@ -39,16 +39,16 @@ type ItemItemCommitsRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *ItemItemCommitsRequestBuilderGetQueryParameters } -// ByCommit_sha gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.commits.item collection -func (m *ItemItemCommitsRequestBuilder) ByCommit_sha(commit_sha string)(*ItemItemCommitsWithCommit_shaItemRequestBuilder) { +// ByCommitsId gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.commits.item collection +func (m *ItemItemCommitsRequestBuilder) ByCommitsId(commitsId string)(*ItemItemCommitsCommitsItemRequestBuilder) { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { urlTplParams[idx] = item } - if commit_sha != "" { - urlTplParams["commit_sha"] = commit_sha + if commitsId != "" { + urlTplParams["commits%2Did"] = commitsId } - return NewItemItemCommitsWithCommit_shaItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) + return NewItemItemCommitsCommitsItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } // NewItemItemCommitsRequestBuilderInternal instantiates a new CommitsRequestBuilder and sets the default values. func NewItemItemCommitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCommitsRequestBuilder) { diff --git a/pkg/github/repos/item_item_owner403_error.go b/pkg/github/repos/item_item_owner403_error.go new file mode 100644 index 00000000..ec8d4429 --- /dev/null +++ b/pkg/github/repos/item_item_owner403_error.go @@ -0,0 +1,113 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwner403Error +type ItemItemOwner403Error 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 documentation_url property + documentation_url *string + // The message property + message *string +} +// NewItemItemOwner403Error instantiates a new ItemItemOwner403Error and sets the default values. +func NewItemItemOwner403Error()(*ItemItemOwner403Error) { + m := &ItemItemOwner403Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwner403ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwner403ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwner403Error(), nil +} +// Error the primary error message. +func (m *ItemItemOwner403Error) 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. +func (m *ItemItemOwner403Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +func (m *ItemItemOwner403Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwner403Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 +func (m *ItemItemOwner403Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *ItemItemOwner403Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemOwner403Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *ItemItemOwner403Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *ItemItemOwner403Error) SetMessage(value *string)() { + m.message = value +} +// ItemItemOwner403Errorable +type ItemItemOwner403Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/repos/item_item_owner_patch_request_body.go b/pkg/github/repos/item_item_owner_patch_request_body.go new file mode 100644 index 00000000..ab095182 --- /dev/null +++ b/pkg/github/repos/item_item_owner_patch_request_body.go @@ -0,0 +1,613 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwnerPatchRequestBody +type ItemItemOwnerPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + allow_auto_merge *bool + // Either `true` to allow private forks, or `false` to prevent private forks. + allow_forking *bool + // Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + allow_merge_commit *bool + // Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + allow_rebase_merge *bool + // Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + allow_squash_merge *bool + // Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + allow_update_branch *bool + // Whether to archive this repository. `false` will unarchive a previously archived repository. + archived *bool + // Updates the default branch for this repository. + default_branch *string + // Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + delete_branch_on_merge *bool + // A short description of the repository. + description *string + // Either `true` to enable issues for this repository or `false` to disable them. + has_issues *bool + // Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + has_projects *bool + // Either `true` to enable the wiki for this repository or `false` to disable it. + has_wiki *bool + // A URL with more information about the repository. + homepage *string + // Either `true` to make this repo available as a template repository or `false` to prevent it. + is_template *bool + // The name of the repository. + name *string + // Either `true` to make the repository private or `false` to make it public. Default: `false`. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + private *bool + // Specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + security_and_analysis ItemItemOwnerPatchRequestBody_security_and_analysisable + // Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + // Deprecated: + use_squash_pr_title_as_default *bool + // Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + web_commit_signoff_required *bool +} +// NewItemItemOwnerPatchRequestBody instantiates a new ItemItemOwnerPatchRequestBody and sets the default values. +func NewItemItemOwnerPatchRequestBody()(*ItemItemOwnerPatchRequestBody) { + m := &ItemItemOwnerPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwnerPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwnerPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwnerPatchRequestBody(), 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. +func (m *ItemItemOwnerPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. +func (m *ItemItemOwnerPatchRequestBody) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowForking gets the allow_forking property value. Either `true` to allow private forks, or `false` to prevent private forks. +func (m *ItemItemOwnerPatchRequestBody) GetAllowForking()(*bool) { + return m.allow_forking +} +// GetAllowMergeCommit gets the allow_merge_commit property value. Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. +func (m *ItemItemOwnerPatchRequestBody) GetAllowMergeCommit()(*bool) { + return m.allow_merge_commit +} +// GetAllowRebaseMerge gets the allow_rebase_merge property value. Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. +func (m *ItemItemOwnerPatchRequestBody) GetAllowRebaseMerge()(*bool) { + return m.allow_rebase_merge +} +// GetAllowSquashMerge gets the allow_squash_merge property value. Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. +func (m *ItemItemOwnerPatchRequestBody) GetAllowSquashMerge()(*bool) { + return m.allow_squash_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. +func (m *ItemItemOwnerPatchRequestBody) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetArchived gets the archived property value. Whether to archive this repository. `false` will unarchive a previously archived repository. +func (m *ItemItemOwnerPatchRequestBody) GetArchived()(*bool) { + return m.archived +} +// GetDefaultBranch gets the default_branch property value. Updates the default branch for this repository. +func (m *ItemItemOwnerPatchRequestBody) GetDefaultBranch()(*string) { + return m.default_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. +func (m *ItemItemOwnerPatchRequestBody) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetDescription gets the description property value. A short description of the repository. +func (m *ItemItemOwnerPatchRequestBody) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwnerPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allow_auto_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAutoMerge(val) + } + return nil + } + res["allow_forking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowForking(val) + } + return nil + } + res["allow_merge_commit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMergeCommit(val) + } + return nil + } + res["allow_rebase_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowRebaseMerge(val) + } + return nil + } + res["allow_squash_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowSquashMerge(val) + } + return nil + } + res["allow_update_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUpdateBranch(val) + } + return nil + } + res["archived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetArchived(val) + } + return nil + } + res["default_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBranch(val) + } + return nil + } + res["delete_branch_on_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeleteBranchOnMerge(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["has_issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasIssues(val) + } + return nil + } + res["has_projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProjects(val) + } + return nil + } + res["has_wiki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasWiki(val) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["is_template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTemplate(val) + } + return nil + } + res["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["security_and_analysis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemOwnerPatchRequestBody_security_and_analysisFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAndAnalysis(val.(ItemItemOwnerPatchRequestBody_security_and_analysisable)) + } + return nil + } + res["use_squash_pr_title_as_default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseSquashPrTitleAsDefault(val) + } + return nil + } + res["web_commit_signoff_required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebCommitSignoffRequired(val) + } + return nil + } + return res +} +// GetHasIssues gets the has_issues property value. Either `true` to enable issues for this repository or `false` to disable them. +func (m *ItemItemOwnerPatchRequestBody) GetHasIssues()(*bool) { + return m.has_issues +} +// GetHasProjects gets the has_projects property value. Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. +func (m *ItemItemOwnerPatchRequestBody) GetHasProjects()(*bool) { + return m.has_projects +} +// GetHasWiki gets the has_wiki property value. Either `true` to enable the wiki for this repository or `false` to disable it. +func (m *ItemItemOwnerPatchRequestBody) GetHasWiki()(*bool) { + return m.has_wiki +} +// GetHomepage gets the homepage property value. A URL with more information about the repository. +func (m *ItemItemOwnerPatchRequestBody) GetHomepage()(*string) { + return m.homepage +} +// GetIsTemplate gets the is_template property value. Either `true` to make this repo available as a template repository or `false` to prevent it. +func (m *ItemItemOwnerPatchRequestBody) GetIsTemplate()(*bool) { + return m.is_template +} +// GetName gets the name property value. The name of the repository. +func (m *ItemItemOwnerPatchRequestBody) GetName()(*string) { + return m.name +} +// GetPrivate gets the private property value. Either `true` to make the repository private or `false` to make it public. Default: `false`. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. +func (m *ItemItemOwnerPatchRequestBody) GetPrivate()(*bool) { + return m.private +} +// GetSecurityAndAnalysis gets the security_and_analysis property value. Specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. +func (m *ItemItemOwnerPatchRequestBody) GetSecurityAndAnalysis()(ItemItemOwnerPatchRequestBody_security_and_analysisable) { + return m.security_and_analysis +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +func (m *ItemItemOwnerPatchRequestBody) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// GetWebCommitSignoffRequired gets the web_commit_signoff_required property value. Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. +func (m *ItemItemOwnerPatchRequestBody) GetWebCommitSignoffRequired()(*bool) { + return m.web_commit_signoff_required +} +// Serialize serializes information the current object +func (m *ItemItemOwnerPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allow_auto_merge", m.GetAllowAutoMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_forking", m.GetAllowForking()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_merge_commit", m.GetAllowMergeCommit()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_rebase_merge", m.GetAllowRebaseMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_squash_merge", m.GetAllowSquashMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allow_update_branch", m.GetAllowUpdateBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("archived", m.GetArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("default_branch", m.GetDefaultBranch()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_issues", m.GetHasIssues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_projects", m.GetHasProjects()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("has_wiki", m.GetHasWiki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("is_template", m.GetIsTemplate()) + 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.WriteObjectValue("security_and_analysis", m.GetSecurityAndAnalysis()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("web_commit_signoff_required", m.GetWebCommitSignoffRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemOwnerPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. +func (m *ItemItemOwnerPatchRequestBody) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowForking sets the allow_forking property value. Either `true` to allow private forks, or `false` to prevent private forks. +func (m *ItemItemOwnerPatchRequestBody) SetAllowForking(value *bool)() { + m.allow_forking = value +} +// SetAllowMergeCommit sets the allow_merge_commit property value. Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. +func (m *ItemItemOwnerPatchRequestBody) SetAllowMergeCommit(value *bool)() { + m.allow_merge_commit = value +} +// SetAllowRebaseMerge sets the allow_rebase_merge property value. Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. +func (m *ItemItemOwnerPatchRequestBody) SetAllowRebaseMerge(value *bool)() { + m.allow_rebase_merge = value +} +// SetAllowSquashMerge sets the allow_squash_merge property value. Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. +func (m *ItemItemOwnerPatchRequestBody) SetAllowSquashMerge(value *bool)() { + m.allow_squash_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. +func (m *ItemItemOwnerPatchRequestBody) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetArchived sets the archived property value. Whether to archive this repository. `false` will unarchive a previously archived repository. +func (m *ItemItemOwnerPatchRequestBody) SetArchived(value *bool)() { + m.archived = value +} +// SetDefaultBranch sets the default_branch property value. Updates the default branch for this repository. +func (m *ItemItemOwnerPatchRequestBody) SetDefaultBranch(value *string)() { + m.default_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. +func (m *ItemItemOwnerPatchRequestBody) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetDescription sets the description property value. A short description of the repository. +func (m *ItemItemOwnerPatchRequestBody) SetDescription(value *string)() { + m.description = value +} +// SetHasIssues sets the has_issues property value. Either `true` to enable issues for this repository or `false` to disable them. +func (m *ItemItemOwnerPatchRequestBody) SetHasIssues(value *bool)() { + m.has_issues = value +} +// SetHasProjects sets the has_projects property value. Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. +func (m *ItemItemOwnerPatchRequestBody) SetHasProjects(value *bool)() { + m.has_projects = value +} +// SetHasWiki sets the has_wiki property value. Either `true` to enable the wiki for this repository or `false` to disable it. +func (m *ItemItemOwnerPatchRequestBody) SetHasWiki(value *bool)() { + m.has_wiki = value +} +// SetHomepage sets the homepage property value. A URL with more information about the repository. +func (m *ItemItemOwnerPatchRequestBody) SetHomepage(value *string)() { + m.homepage = value +} +// SetIsTemplate sets the is_template property value. Either `true` to make this repo available as a template repository or `false` to prevent it. +func (m *ItemItemOwnerPatchRequestBody) SetIsTemplate(value *bool)() { + m.is_template = value +} +// SetName sets the name property value. The name of the repository. +func (m *ItemItemOwnerPatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetPrivate sets the private property value. Either `true` to make the repository private or `false` to make it public. Default: `false`. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. +func (m *ItemItemOwnerPatchRequestBody) SetPrivate(value *bool)() { + m.private = value +} +// SetSecurityAndAnalysis sets the security_and_analysis property value. Specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. +func (m *ItemItemOwnerPatchRequestBody) SetSecurityAndAnalysis(value ItemItemOwnerPatchRequestBody_security_and_analysisable)() { + m.security_and_analysis = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. +// Deprecated: +func (m *ItemItemOwnerPatchRequestBody) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +// SetWebCommitSignoffRequired sets the web_commit_signoff_required property value. Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. +func (m *ItemItemOwnerPatchRequestBody) SetWebCommitSignoffRequired(value *bool)() { + m.web_commit_signoff_required = value +} +// ItemItemOwnerPatchRequestBodyable +type ItemItemOwnerPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAutoMerge()(*bool) + GetAllowForking()(*bool) + GetAllowMergeCommit()(*bool) + GetAllowRebaseMerge()(*bool) + GetAllowSquashMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetArchived()(*bool) + GetDefaultBranch()(*string) + GetDeleteBranchOnMerge()(*bool) + GetDescription()(*string) + GetHasIssues()(*bool) + GetHasProjects()(*bool) + GetHasWiki()(*bool) + GetHomepage()(*string) + GetIsTemplate()(*bool) + GetName()(*string) + GetPrivate()(*bool) + GetSecurityAndAnalysis()(ItemItemOwnerPatchRequestBody_security_and_analysisable) + GetUseSquashPrTitleAsDefault()(*bool) + GetWebCommitSignoffRequired()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowForking(value *bool)() + SetAllowMergeCommit(value *bool)() + SetAllowRebaseMerge(value *bool)() + SetAllowSquashMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetArchived(value *bool)() + SetDefaultBranch(value *string)() + SetDeleteBranchOnMerge(value *bool)() + SetDescription(value *string)() + SetHasIssues(value *bool)() + SetHasProjects(value *bool)() + SetHasWiki(value *bool)() + SetHomepage(value *string)() + SetIsTemplate(value *bool)() + SetName(value *string)() + SetPrivate(value *bool)() + SetSecurityAndAnalysis(value ItemItemOwnerPatchRequestBody_security_and_analysisable)() + SetUseSquashPrTitleAsDefault(value *bool)() + SetWebCommitSignoffRequired(value *bool)() +} diff --git a/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis.go b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis.go new file mode 100644 index 00000000..ab0afa8a --- /dev/null +++ b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis.go @@ -0,0 +1,134 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwnerPatchRequestBody_security_and_analysis specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. +type ItemItemOwnerPatchRequestBody_security_and_analysis struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." + advanced_security ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable + // Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." + secret_scanning ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable + // Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + secret_scanning_push_protection ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable +} +// NewItemItemOwnerPatchRequestBody_security_and_analysis instantiates a new ItemItemOwnerPatchRequestBody_security_and_analysis and sets the default values. +func NewItemItemOwnerPatchRequestBody_security_and_analysis()(*ItemItemOwnerPatchRequestBody_security_and_analysis) { + m := &ItemItemOwnerPatchRequestBody_security_and_analysis{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwnerPatchRequestBody_security_and_analysisFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwnerPatchRequestBody_security_and_analysisFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwnerPatchRequestBody_security_and_analysis(), 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. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAdvancedSecurity gets the advanced_security property value. Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) GetAdvancedSecurity()(ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable) { + return m.advanced_security +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["advanced_security"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedSecurity(val.(ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable)) + } + return nil + } + res["secret_scanning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanning(val.(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable)) + } + return nil + } + res["secret_scanning_push_protection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningPushProtection(val.(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)) + } + return nil + } + return res +} +// GetSecretScanning gets the secret_scanning property value. Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) GetSecretScanning()(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable) { + return m.secret_scanning +} +// GetSecretScanningPushProtection gets the secret_scanning_push_protection property value. Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) GetSecretScanningPushProtection()(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable) { + return m.secret_scanning_push_protection +} +// Serialize serializes information the current object +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("advanced_security", m.GetAdvancedSecurity()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("secret_scanning", m.GetSecretScanning()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("secret_scanning_push_protection", m.GetSecretScanningPushProtection()) + 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 *ItemItemOwnerPatchRequestBody_security_and_analysis) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAdvancedSecurity sets the advanced_security property value. Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) SetAdvancedSecurity(value ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable)() { + m.advanced_security = value +} +// SetSecretScanning sets the secret_scanning property value. Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) SetSecretScanning(value ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable)() { + m.secret_scanning = value +} +// SetSecretScanningPushProtection sets the secret_scanning_push_protection property value. Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis) SetSecretScanningPushProtection(value ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)() { + m.secret_scanning_push_protection = value +} +// ItemItemOwnerPatchRequestBody_security_and_analysisable +type ItemItemOwnerPatchRequestBody_security_and_analysisable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSecurity()(ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable) + GetSecretScanning()(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable) + GetSecretScanningPushProtection()(ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable) + SetAdvancedSecurity(value ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable)() + SetSecretScanning(value ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable)() + SetSecretScanningPushProtection(value ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable)() +} diff --git a/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_advanced_security.go b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_advanced_security.go new file mode 100644 index 00000000..b1c2f3e7 --- /dev/null +++ b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_advanced_security.go @@ -0,0 +1,78 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." +type ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Can be `enabled` or `disabled`. + status *string +} +// NewItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security instantiates a new ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security and sets the default values. +func NewItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security()(*ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) { + m := &ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security(), 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. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("status", m.GetStatus()) + 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 *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_security) SetStatus(value *string)() { + m.status = value +} +// ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable +type ItemItemOwnerPatchRequestBody_security_and_analysis_advanced_securityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning.go b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning.go new file mode 100644 index 00000000..6da72b84 --- /dev/null +++ b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning.go @@ -0,0 +1,78 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." +type ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Can be `enabled` or `disabled`. + status *string +} +// NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning instantiates a new ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning and sets the default values. +func NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning()(*ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) { + m := &ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning(), 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. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("status", m.GetStatus()) + 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 *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning) SetStatus(value *string)() { + m.status = value +} +// ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable +type ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanningable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning_push_protection.go b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning_push_protection.go new file mode 100644 index 00000000..092b627d --- /dev/null +++ b/pkg/github/repos/item_item_owner_patch_request_body_security_and_analysis_secret_scanning_push_protection.go @@ -0,0 +1,78 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +type ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Can be `enabled` or `disabled`. + status *string +} +// NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection instantiates a new ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection and sets the default values. +func NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection()(*ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) { + m := &ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection(), 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. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("status", m.GetStatus()) + 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 *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetStatus sets the status property value. Can be `enabled` or `disabled`. +func (m *ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protection) SetStatus(value *string)() { + m.status = value +} +// ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable +type ItemItemOwnerPatchRequestBody_security_and_analysis_secret_scanning_push_protectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*string) + SetStatus(value *string)() +} diff --git a/pkg/github/repos/item_owner_item_request_builder.go b/pkg/github/repos/item_owner_item_request_builder.go new file mode 100644 index 00000000..cd77e9a7 --- /dev/null +++ b/pkg/github/repos/item_owner_item_request_builder.go @@ -0,0 +1,408 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemOwnerItemRequestBuilder builds and executes requests for operations under \repos\{repos-id}\{Owner-id} +type ItemOwnerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOwnerItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemOwnerItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ItemOwnerItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemOwnerItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ItemOwnerItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemOwnerItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Actions the actions property +func (m *ItemOwnerItemRequestBuilder) Actions()(*ItemItemActionsRequestBuilder) { + return NewItemItemActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Activity the activity property +func (m *ItemOwnerItemRequestBuilder) Activity()(*ItemItemActivityRequestBuilder) { + return NewItemItemActivityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Assignees the assignees property +func (m *ItemOwnerItemRequestBuilder) Assignees()(*ItemItemAssigneesRequestBuilder) { + return NewItemItemAssigneesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Autolinks the autolinks property +func (m *ItemOwnerItemRequestBuilder) Autolinks()(*ItemItemAutolinksRequestBuilder) { + return NewItemItemAutolinksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// AutomatedSecurityFixes the automatedSecurityFixes property +func (m *ItemOwnerItemRequestBuilder) AutomatedSecurityFixes()(*ItemItemAutomatedSecurityFixesRequestBuilder) { + return NewItemItemAutomatedSecurityFixesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Branches the branches property +func (m *ItemOwnerItemRequestBuilder) Branches()(*ItemItemBranchesRequestBuilder) { + return NewItemItemBranchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckRuns the checkRuns property +func (m *ItemOwnerItemRequestBuilder) CheckRuns()(*ItemItemCheckRunsRequestBuilder) { + return NewItemItemCheckRunsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CheckSuites the checkSuites property +func (m *ItemOwnerItemRequestBuilder) CheckSuites()(*ItemItemCheckSuitesRequestBuilder) { + return NewItemItemCheckSuitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codeowners the codeowners property +func (m *ItemOwnerItemRequestBuilder) Codeowners()(*ItemItemCodeownersRequestBuilder) { + return NewItemItemCodeownersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CodeScanning the codeScanning property +func (m *ItemOwnerItemRequestBuilder) CodeScanning()(*ItemItemCodeScanningRequestBuilder) { + return NewItemItemCodeScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Codespaces the codespaces property +func (m *ItemOwnerItemRequestBuilder) Codespaces()(*ItemItemCodespacesRequestBuilder) { + return NewItemItemCodespacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Collaborators the collaborators property +func (m *ItemOwnerItemRequestBuilder) Collaborators()(*ItemItemCollaboratorsRequestBuilder) { + return NewItemItemCollaboratorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Comments the comments property +func (m *ItemOwnerItemRequestBuilder) Comments()(*ItemItemCommentsRequestBuilder) { + return NewItemItemCommentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Commits the commits property +func (m *ItemOwnerItemRequestBuilder) Commits()(*ItemItemCommitsRequestBuilder) { + return NewItemItemCommitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Community the community property +func (m *ItemOwnerItemRequestBuilder) Community()(*ItemItemCommunityRequestBuilder) { + return NewItemItemCommunityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Compare the compare property +func (m *ItemOwnerItemRequestBuilder) Compare()(*ItemItemCompareRequestBuilder) { + return NewItemItemCompareRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemOwnerItemRequestBuilderInternal instantiates a new OwnerItemRequestBuilder and sets the default values. +func NewItemOwnerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnerItemRequestBuilder) { + m := &ItemOwnerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{repos%2Did}/{Owner%2Did}", pathParameters), + } + return m +} +// NewItemOwnerItemRequestBuilder instantiates a new OwnerItemRequestBuilder and sets the default values. +func NewItemOwnerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOwnerItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Contents the contents property +func (m *ItemOwnerItemRequestBuilder) Contents()(*ItemItemContentsRequestBuilder) { + return NewItemItemContentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Contributors the contributors property +func (m *ItemOwnerItemRequestBuilder) Contributors()(*ItemItemContributorsRequestBuilder) { + return NewItemItemContributorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.If an organization owner has configured the organization to prevent members from deleting organization-ownedrepositories, you will get a `403 Forbidden` response. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/repos#delete-a-repository +func (m *ItemOwnerItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemOwnerItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": CreateItemItemOwner403ErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Dependabot the dependabot property +func (m *ItemOwnerItemRequestBuilder) Dependabot()(*ItemItemDependabotRequestBuilder) { + return NewItemItemDependabotRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// DependencyGraph the dependencyGraph property +func (m *ItemOwnerItemRequestBuilder) DependencyGraph()(*ItemItemDependencyGraphRequestBuilder) { + return NewItemItemDependencyGraphRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Deployments the deployments property +func (m *ItemOwnerItemRequestBuilder) Deployments()(*ItemItemDeploymentsRequestBuilder) { + return NewItemItemDeploymentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Dispatches the dispatches property +func (m *ItemOwnerItemRequestBuilder) Dispatches()(*ItemItemDispatchesRequestBuilder) { + return NewItemItemDispatchesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Environments the environments property +func (m *ItemOwnerItemRequestBuilder) Environments()(*ItemItemEnvironmentsRequestBuilder) { + return NewItemItemEnvironmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Events the events property +func (m *ItemOwnerItemRequestBuilder) Events()(*ItemItemEventsRequestBuilder) { + return NewItemItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Forks the forks property +func (m *ItemOwnerItemRequestBuilder) Forks()(*ItemItemForksRequestBuilder) { + return NewItemItemForksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Generate the generate property +func (m *ItemOwnerItemRequestBuilder) Generate()(*ItemItemGenerateRequestBuilder) { + return NewItemItemGenerateRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.**Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/repos#get-a-repository +func (m *ItemOwnerItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemOwnerItemRequestBuilderGetRequestConfiguration)(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.FullRepositoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.FullRepositoryable), nil +} +// Git the git property +func (m *ItemOwnerItemRequestBuilder) Git()(*ItemItemGitRequestBuilder) { + return NewItemItemGitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Hooks the hooks property +func (m *ItemOwnerItemRequestBuilder) Hooks()(*ItemItemHooksRequestBuilder) { + return NewItemItemHooksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ImportEscaped the import property +func (m *ItemOwnerItemRequestBuilder) ImportEscaped()(*ItemItemImportRequestBuilder) { + return NewItemItemImportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Installation the installation property +func (m *ItemOwnerItemRequestBuilder) Installation()(*ItemItemInstallationRequestBuilder) { + return NewItemItemInstallationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// InteractionLimits the interactionLimits property +func (m *ItemOwnerItemRequestBuilder) InteractionLimits()(*ItemItemInteractionLimitsRequestBuilder) { + return NewItemItemInteractionLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Invitations the invitations property +func (m *ItemOwnerItemRequestBuilder) Invitations()(*ItemItemInvitationsRequestBuilder) { + return NewItemItemInvitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Issues the issues property +func (m *ItemOwnerItemRequestBuilder) Issues()(*ItemItemIssuesRequestBuilder) { + return NewItemItemIssuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Keys the keys property +func (m *ItemOwnerItemRequestBuilder) Keys()(*ItemItemKeysRequestBuilder) { + return NewItemItemKeysRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Labels the labels property +func (m *ItemOwnerItemRequestBuilder) Labels()(*ItemItemLabelsRequestBuilder) { + return NewItemItemLabelsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Languages the languages property +func (m *ItemOwnerItemRequestBuilder) Languages()(*ItemItemLanguagesRequestBuilder) { + return NewItemItemLanguagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// License the license property +func (m *ItemOwnerItemRequestBuilder) License()(*ItemItemLicenseRequestBuilder) { + return NewItemItemLicenseRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Merges the merges property +func (m *ItemOwnerItemRequestBuilder) Merges()(*ItemItemMergesRequestBuilder) { + return NewItemItemMergesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// MergeUpstream the mergeUpstream property +func (m *ItemOwnerItemRequestBuilder) MergeUpstream()(*ItemItemMergeUpstreamRequestBuilder) { + return NewItemItemMergeUpstreamRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Milestones the milestones property +func (m *ItemOwnerItemRequestBuilder) Milestones()(*ItemItemMilestonesRequestBuilder) { + return NewItemItemMilestonesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Notifications the notifications property +func (m *ItemOwnerItemRequestBuilder) Notifications()(*ItemItemNotificationsRequestBuilder) { + return NewItemItemNotificationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Pages the pages property +func (m *ItemOwnerItemRequestBuilder) Pages()(*ItemItemPagesRequestBuilder) { + return NewItemItemPagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/repos#update-a-repository +func (m *ItemOwnerItemRequestBuilder) Patch(ctx context.Context, body ItemItemOwnerPatchRequestBodyable, requestConfiguration *ItemOwnerItemRequestBuilderPatchRequestConfiguration)(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.FullRepositoryable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.FullRepositoryable), nil +} +// PrivateVulnerabilityReporting the privateVulnerabilityReporting property +func (m *ItemOwnerItemRequestBuilder) PrivateVulnerabilityReporting()(*ItemItemPrivateVulnerabilityReportingRequestBuilder) { + return NewItemItemPrivateVulnerabilityReportingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Projects the projects property +func (m *ItemOwnerItemRequestBuilder) Projects()(*ItemItemProjectsRequestBuilder) { + return NewItemItemProjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Properties the properties property +func (m *ItemOwnerItemRequestBuilder) Properties()(*ItemItemPropertiesRequestBuilder) { + return NewItemItemPropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Pulls the pulls property +func (m *ItemOwnerItemRequestBuilder) Pulls()(*ItemItemPullsRequestBuilder) { + return NewItemItemPullsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Readme the readme property +func (m *ItemOwnerItemRequestBuilder) Readme()(*ItemItemReadmeRequestBuilder) { + return NewItemItemReadmeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Releases the releases property +func (m *ItemOwnerItemRequestBuilder) Releases()(*ItemItemReleasesRequestBuilder) { + return NewItemItemReleasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rules the rules property +func (m *ItemOwnerItemRequestBuilder) Rules()(*ItemItemRulesRequestBuilder) { + return NewItemItemRulesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Rulesets the rulesets property +func (m *ItemOwnerItemRequestBuilder) Rulesets()(*ItemItemRulesetsRequestBuilder) { + return NewItemItemRulesetsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecretScanning the secretScanning property +func (m *ItemOwnerItemRequestBuilder) SecretScanning()(*ItemItemSecretScanningRequestBuilder) { + return NewItemItemSecretScanningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SecurityAdvisories the securityAdvisories property +func (m *ItemOwnerItemRequestBuilder) SecurityAdvisories()(*ItemItemSecurityAdvisoriesRequestBuilder) { + return NewItemItemSecurityAdvisoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stargazers the stargazers property +func (m *ItemOwnerItemRequestBuilder) Stargazers()(*ItemItemStargazersRequestBuilder) { + return NewItemItemStargazersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Stats the stats property +func (m *ItemOwnerItemRequestBuilder) Stats()(*ItemItemStatsRequestBuilder) { + return NewItemItemStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Statuses the statuses property +func (m *ItemOwnerItemRequestBuilder) Statuses()(*ItemItemStatusesRequestBuilder) { + return NewItemItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscribers the subscribers property +func (m *ItemOwnerItemRequestBuilder) Subscribers()(*ItemItemSubscribersRequestBuilder) { + return NewItemItemSubscribersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Subscription the subscription property +func (m *ItemOwnerItemRequestBuilder) Subscription()(*ItemItemSubscriptionRequestBuilder) { + return NewItemItemSubscriptionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tags the tags property +func (m *ItemOwnerItemRequestBuilder) Tags()(*ItemItemTagsRequestBuilder) { + return NewItemItemTagsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tarball the tarball property +func (m *ItemOwnerItemRequestBuilder) Tarball()(*ItemItemTarballRequestBuilder) { + return NewItemItemTarballRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Teams the teams property +func (m *ItemOwnerItemRequestBuilder) Teams()(*ItemItemTeamsRequestBuilder) { + return NewItemItemTeamsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.If an organization owner has configured the organization to prevent members from deleting organization-ownedrepositories, you will get a `403 Forbidden` response. +func (m *ItemOwnerItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemOwnerItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation the `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.**Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." +func (m *ItemOwnerItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOwnerItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. +func (m *ItemOwnerItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemOwnerPatchRequestBodyable, requestConfiguration *ItemOwnerItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + 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 +} +// Topics the topics property +func (m *ItemOwnerItemRequestBuilder) Topics()(*ItemItemTopicsRequestBuilder) { + return NewItemItemTopicsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Traffic the traffic property +func (m *ItemOwnerItemRequestBuilder) Traffic()(*ItemItemTrafficRequestBuilder) { + return NewItemItemTrafficRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Transfer the transfer property +func (m *ItemOwnerItemRequestBuilder) Transfer()(*ItemItemTransferRequestBuilder) { + return NewItemItemTransferRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// VulnerabilityAlerts the vulnerabilityAlerts property +func (m *ItemOwnerItemRequestBuilder) VulnerabilityAlerts()(*ItemItemVulnerabilityAlertsRequestBuilder) { + return NewItemItemVulnerabilityAlertsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemOwnerItemRequestBuilder) WithUrl(rawUrl string)(*ItemOwnerItemRequestBuilder) { + return NewItemOwnerItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} +// Zipball the zipball property +func (m *ItemOwnerItemRequestBuilder) Zipball()(*ItemItemZipballRequestBuilder) { + return NewItemItemZipballRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/repos_item_request_builder.go b/pkg/github/repos/repos_item_request_builder.go new file mode 100644 index 00000000..b06a0539 --- /dev/null +++ b/pkg/github/repos/repos_item_request_builder.go @@ -0,0 +1,34 @@ +package repos + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ReposItemRequestBuilder builds and executes requests for operations under \repos\{repos-id} +type ReposItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByOwnerId gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item collection +func (m *ReposItemRequestBuilder) ByOwnerId(ownerId string)(*ItemOwnerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if ownerId != "" { + urlTplParams["Owner%2Did"] = ownerId + } + return NewItemOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewReposItemRequestBuilderInternal instantiates a new ReposItemRequestBuilder and sets the default values. +func NewReposItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposItemRequestBuilder) { + m := &ReposItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{repos%2Did}", pathParameters), + } + return m +} +// NewReposItemRequestBuilder instantiates a new ReposItemRequestBuilder and sets the default values. +func NewReposItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewReposItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/repos/repos_request_builder.go b/pkg/github/repos/repos_request_builder.go index 567e46a7..d2cf331e 100644 --- a/pkg/github/repos/repos_request_builder.go +++ b/pkg/github/repos/repos_request_builder.go @@ -8,16 +8,16 @@ import ( type ReposRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ByOwner gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item collection -func (m *ReposRequestBuilder) ByOwner(owner string)(*WithOwnerItemRequestBuilder) { +// ByReposId gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item collection +func (m *ReposRequestBuilder) ByReposId(reposId string)(*ReposItemRequestBuilder) { urlTplParams := make(map[string]string) for idx, item := range m.BaseRequestBuilder.PathParameters { urlTplParams[idx] = item } - if owner != "" { - urlTplParams["owner"] = owner + if reposId != "" { + urlTplParams["repos%2Did"] = reposId } - return NewWithOwnerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) + return NewReposItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) } // NewReposRequestBuilderInternal instantiates a new ReposRequestBuilder and sets the default values. func NewReposRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ReposRequestBuilder) {